/**Begin D:\DBA\PDM_UPGRADE\PDM1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FMONEY')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FMONEY VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FSCENARIOID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FSCENARIOID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FYEARID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FYEARID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FPERIODID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FPERIODID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FORGID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FORGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FCURRENCYID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FCURRENCYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FPROCESSID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FPROCESSID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FAUDITTRAILID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FAUDITTRAILID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_EXTENDDATASUM' AND KSQL_COL_NAME IN ('FENTITYID')) 
 ALTER TABLE T_BCM_EXTENDDATASUM ADD (FENTITYID BIGINT DEFAULT 0 NOT NULL );

/**End D:\DBA\PDM_UPGRADE\PDM1\BCM_table.sql **/
