/**Begin D:\softwaresetup\PDM_UPGRADE\PDM1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FBUYMATCHFLAG')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FBUYMATCHFLAG NVARCHAR(50) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FBUYMATCHAMOUNT')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FBUYMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FBUYUNMATCHAMOUNT')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FBUYUNMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FBUYMATCHFLAGMSG')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FBUYMATCHFLAGMSG NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FSELLMATCHFLAG')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FSELLMATCHFLAG NVARCHAR(50) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FSELLMATCHAMOUNT')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FSELLMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FSELLUNMATCHAMOUNT')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FSELLUNMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FSELLMATCHFLAGMSG')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FSELLMATCHFLAGMSG NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FFEEMATCHFLAG')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FFEEMATCHFLAG NVARCHAR(50) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FFEEMATCHAMOUNT')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FFEEMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FFEEUNMATCHAMOUNT')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FFEEUNMATCHAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FFEEMATCHFLAGMSG')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FFEEMATCHFLAGMSG NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_EXCHANGEBILL' AND KSQL_COL_NAME IN ('FMATCHFLAG')) 
 ALTER TABLE T_CAS_EXCHANGEBILL ADD (FMATCHFLAG NVARCHAR(50) DEFAULT '0' NOT NULL );

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