/**Begin C:\Users\RD_geores_li\Desktop\PDM_UPGRADE\PDMNEW\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FUNIFORMSOCIALCREDITCODE')) 
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FUNIFORMSOCIALCREDITCODE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FPAYERNUMBER')) 
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FPAYERNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FPAYEENUMBER')) 
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FPAYEENUMBER VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FPRIORITY')) 
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FPRIORITY VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FISTOP')) 
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FISTOP CHAR(1) DEFAULT '0' NOT NULL );

/**End C:\Users\RD_geores_li\Desktop\PDM_UPGRADE\PDMNEW\CAS_table.sql **/
