/**Begin D:\softwaresetup\PDM_UPGRADE\PDM1\FPM_table.sql **/
 EXEC p_AlterColumn 'T_FPM_MEMBER_E', 'FREPORTTYPE', 'VARCHAR(100)', 'NULL', '0010', '';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER_E' AND KSQL_COL_NAME IN ('FREPORTTYPE_C')) 
 ALTER TABLE T_FPM_MEMBER_E ADD (FREPORTTYPE_C BIGINT 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 ('FCAPORG')) 
 ALTER TABLE T_FPM_MEMBER_E ADD (FCAPORG BIGINT 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 ('FORGFIELD')) 
 ALTER TABLE T_FPM_MEMBER_E ADD (FORGFIELD BIGINT 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 ('FPERIODTYPE'))
 ALTER TABLE T_FPM_MEMBER_E ADD (FPERIODTYPE 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 ('FBASEDATAFIELD'))
 ALTER TABLE T_FPM_DIMADD ADD (FBASEDATAFIELD BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FPM_MEMBER' AND KSQL_COL_NAME IN ('FORG')) 
 ALTER TABLE T_FPM_MEMBER ADD (FORG BIGINT DEFAULT 0 NOT NULL );

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