/**Begin D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG' AND KSQL_COL_NAME ='FCHECKSTATE') 
 ALTER TABLE T_BCM_SCHEMECOLLECTLOG ADD (FCHECKSTATE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG' AND KSQL_COL_NAME ='FCOLLECTORSTATE') 
 ALTER TABLE T_BCM_SCHEMECOLLECTLOG ADD (FCOLLECTORSTATE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG' AND KSQL_COL_NAME ='FSTEP') 
 ALTER TABLE T_BCM_SCHEMECOLLECTLOG ADD (FSTEP CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMECOLLECTLOG' AND KSQL_COL_NAME ='FSPEND') 
 ALTER TABLE T_BCM_SCHEMECOLLECTLOG ADD (FSPEND CHAR(20) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_SCHEMEEXECUTEREC' AND KSQL_COL_NAME ='FCHECKSTATUS') 
 ALTER TABLE T_BCM_SCHEMEEXECUTEREC ADD (FCHECKSTATUS CHAR(1) DEFAULT '1' NOT NULL );
 EXEC p_AlterColumn 'T_BCM_DATACOMPARISONTABLE', 'FAMOUNT', 'DECIMAL(38,20)', 'NOT NULL', '0100', '0';

 EXEC p_AlterColumn 'T_BCM_DATACOMPARISONTABLE', 'FMDAMOUNT', 'DECIMAL(38,20)', 'NOT NULL', '0100', '0';


/**End D:\PDM\PDM_UPGRADE\pdm1\BCM_table.sql **/
