/**Begin D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMDETAILENTRY' AND KSQL_COL_NAME IN ('FCOREBILLENTRYID')) 
 ALTER TABLE T_CAS_CLAIMDETAILENTRY ADD (FCOREBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMDETAILENTRY' AND KSQL_COL_NAME IN ('FCONBILLID')) 
 ALTER TABLE T_CAS_CLAIMDETAILENTRY ADD (FCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMDETAILENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTITY')) 
 ALTER TABLE T_CAS_CLAIMDETAILENTRY ADD (FCONBILLENTITY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMDETAILENTRY' AND KSQL_COL_NAME IN ('FCONBILLNUMBER')) 
 ALTER TABLE T_CAS_CLAIMDETAILENTRY ADD (FCONBILLNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMDETAILENTRY' AND KSQL_COL_NAME IN ('FCONBILLROWNUM')) 
 ALTER TABLE T_CAS_CLAIMDETAILENTRY ADD (FCONBILLROWNUM NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMDETAILENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTRYID')) 
 ALTER TABLE T_CAS_CLAIMDETAILENTRY ADD (FCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMNOTICEBILL_E' AND KSQL_COL_NAME IN ('FCOREBILLENTRYID')) 
 ALTER TABLE T_CAS_CLAIMNOTICEBILL_E ADD (FCOREBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMNOTICEBILL_E' AND KSQL_COL_NAME IN ('FCONBILLID')) 
 ALTER TABLE T_CAS_CLAIMNOTICEBILL_E ADD (FCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMNOTICEBILL_E' AND KSQL_COL_NAME IN ('FCONBILLENTITY')) 
 ALTER TABLE T_CAS_CLAIMNOTICEBILL_E ADD (FCONBILLENTITY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMNOTICEBILL_E' AND KSQL_COL_NAME IN ('FCONBILLNUMBER')) 
 ALTER TABLE T_CAS_CLAIMNOTICEBILL_E ADD (FCONBILLNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMNOTICEBILL_E' AND KSQL_COL_NAME IN ('FCONBILLROWNUM')) 
 ALTER TABLE T_CAS_CLAIMNOTICEBILL_E ADD (FCONBILLROWNUM NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_CLAIMNOTICEBILL_E' AND KSQL_COL_NAME IN ('FCONBILLENTRYID')) 
 ALTER TABLE T_CAS_CLAIMNOTICEBILL_E ADD (FCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FCOREBILLID')) 
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FCOREBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FCOREBILLENTRYID')) 
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FCOREBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLID')) 
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTITY')) 
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FCONBILLENTITY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLNUMBER')) 
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FCONBILLNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLROWNUM')) 
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FCONBILLROWNUM NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTRYID')) 
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGBENTRY' AND KSQL_COL_NAME IN ('FBCOREBILLENTRYID')) 
 ALTER TABLE T_CAS_RECBILLCHANGBENTRY ADD (FBCOREBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGBENTRY' AND KSQL_COL_NAME IN ('FBCONBILLID')) 
 ALTER TABLE T_CAS_RECBILLCHANGBENTRY ADD (FBCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGBENTRY' AND KSQL_COL_NAME IN ('FBCONBILLENTITY')) 
 ALTER TABLE T_CAS_RECBILLCHANGBENTRY ADD (FBCONBILLENTITY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGBENTRY' AND KSQL_COL_NAME IN ('FBCONBILLNUMBER')) 
 ALTER TABLE T_CAS_RECBILLCHANGBENTRY ADD (FBCONBILLNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGBENTRY' AND KSQL_COL_NAME IN ('FBCONBILLROWNUM')) 
 ALTER TABLE T_CAS_RECBILLCHANGBENTRY ADD (FBCONBILLROWNUM NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGBENTRY' AND KSQL_COL_NAME IN ('FBCONBILLENTRYID')) 
 ALTER TABLE T_CAS_RECBILLCHANGBENTRY ADD (FBCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECEIVINGBILLENTRY' AND KSQL_COL_NAME IN ('FCOREBILLENTRYID')) 
 ALTER TABLE T_CAS_RECEIVINGBILLENTRY ADD (FCOREBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECEIVINGBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLID')) 
 ALTER TABLE T_CAS_RECEIVINGBILLENTRY ADD (FCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECEIVINGBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTITY')) 
 ALTER TABLE T_CAS_RECEIVINGBILLENTRY ADD (FCONBILLENTITY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECEIVINGBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLNUMBER')) 
 ALTER TABLE T_CAS_RECEIVINGBILLENTRY ADD (FCONBILLNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECEIVINGBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLROWNUM')) 
 ALTER TABLE T_CAS_RECEIVINGBILLENTRY ADD (FCONBILLROWNUM NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECEIVINGBILLENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTRYID')) 
 ALTER TABLE T_CAS_RECEIVINGBILLENTRY ADD (FCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGENTRY' AND KSQL_COL_NAME IN ('FCOREBILLENTRYID')) 
 ALTER TABLE T_CAS_RECBILLCHANGENTRY ADD (FCOREBILLENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGENTRY' AND KSQL_COL_NAME IN ('FCONBILLID')) 
 ALTER TABLE T_CAS_RECBILLCHANGENTRY ADD (FCONBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTITY')) 
 ALTER TABLE T_CAS_RECBILLCHANGENTRY ADD (FCONBILLENTITY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGENTRY' AND KSQL_COL_NAME IN ('FCONBILLNUMBER')) 
 ALTER TABLE T_CAS_RECBILLCHANGENTRY ADD (FCONBILLNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGENTRY' AND KSQL_COL_NAME IN ('FCONBILLROWNUM')) 
 ALTER TABLE T_CAS_RECBILLCHANGENTRY ADD (FCONBILLROWNUM NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANGENTRY' AND KSQL_COL_NAME IN ('FCONBILLENTRYID')) 
 ALTER TABLE T_CAS_RECBILLCHANGENTRY ADD (FCONBILLENTRYID BIGINT DEFAULT 0 NOT NULL );

/**End D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
