/**Begin D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FENTRYEXRATETABLE')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FENTRYEXRATETABLE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FENTRYEXRATEDATE')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FENTRYEXRATEDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FENTRYQUOTATION')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FENTRYQUOTATION NVARCHAR(30) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FENTRYEXRATE')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FENTRYEXRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FENTRYPAYCURRENCYID')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FENTRYPAYCURRENCYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FSTANDARDMONEYID')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FSTANDARDMONEYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FDSMONEY')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FDSMONEY DECIMAL(19,6) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_TRANSFERAPPLY_ENTRY' AND KSQL_COL_NAME IN ('FPAYMENTMONEY')) 
 ALTER TABLE T_CAS_TRANSFERAPPLY_ENTRY ADD (FPAYMENTMONEY DECIMAL(19,6) DEFAULT 0 NOT NULL );

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