/**Begin D:\software\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FMETRICTYPE'))
ALTER TABLE T_FPM_MEMBER_E ADD (FMETRICTYPE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FMETRICUSE'))
ALTER TABLE T_FPM_MEMBER_E ADD (FMETRICUSE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FMETRICDATATYPE'))
ALTER TABLE T_FPM_MEMBER_E ADD (FMETRICDATATYPE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FCOMPUTEFORMULA'))
ALTER TABLE T_FPM_MEMBER_E ADD (FCOMPUTEFORMULA VARCHAR(512) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FCOMPUTEFORMULAVALUE'))
ALTER TABLE T_FPM_MEMBER_E ADD (FCOMPUTEFORMULAVALUE VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FCOMPUTEFORMULAVALUE_TAG'))
ALTER TABLE T_FPM_MEMBER_E ADD (FCOMPUTEFORMULAVALUE_TAG NCLOB DEFAULT ' ' );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FPRESET'))
ALTER TABLE T_FPM_MEMBER_E ADD (FPRESET CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FMETRICPRESETTYPE'))
ALTER TABLE T_FPM_MEMBER_E ADD (FMETRICPRESETTYPE VARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_DIMADD' AND KSQL_COL_NAME IN ('FMEMBERFROM'))
ALTER TABLE T_FPM_DIMADD ADD (FMEMBERFROM VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_DIMADD' AND KSQL_COL_NAME IN ('FDIMENSIONREL'))
ALTER TABLE T_FPM_DIMADD ADD (FDIMENSIONREL VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_DIMADD' AND KSQL_COL_NAME IN ('FRELBASEDATA'))
ALTER TABLE T_FPM_DIMADD ADD (FRELBASEDATA VARCHAR(36) DEFAULT ' ' NOT NULL );

/**End D:\software\PDM_UPGRADE\PDM1\FPM_table.sql **/
