/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FISCOMBINERECORD') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FISCOMBINERECORD CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FPAYEEAMOUNT') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FPAYEEAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FCHGPAYEEACCBANKID') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FCHGPAYEEACCBANKID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FCHGPAYEEACCBANK') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FCHGPAYEEACCBANK BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FCHGUSERACCBANK') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FCHGUSERACCBANK BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FISAFTERCOMBINERECORD') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FISAFTERCOMBINERECORD CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FSOURCEENTRYID') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FSOURCEENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYCHGBILLENTRY' AND KSQL_COL_NAME ='FRECERID') 
 ALTER TABLE T_CAS_PAYCHGBILLENTRY ADD (FRECERID BIGINT DEFAULT 0 NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_table.sql **/
