/**Begin D:\PDM_UPGRADE\PDM1\TM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_TRADE_O' AND KSQL_COL_NAME IN ('FCURRENCYRATE'))
 ALTER TABLE T_TM_TRADE_O ADD (FCURRENCYRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_TRADE_O' AND KSQL_COL_NAME IN ('FSELLCURRENCYRATE'))
 ALTER TABLE T_TM_TRADE_O ADD (FSELLCURRENCYRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_TRADE_O' AND KSQL_COL_NAME IN ('FISSPECEXRATE'))
 ALTER TABLE T_TM_TRADE_O ADD (FISSPECEXRATE CHAR(1) DEFAULT ' ' NOT NULL );

-- 损益确认字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL' AND KSQL_COL_NAME IN ('FISPLCONFIRM'))
 ALTER TABLE T_TM_BUSINESSBILL ADD (FISPLCONFIRM CHAR(1) DEFAULT '1' NOT NULL );
/**End D:\PDM_UPGRADE\PDM1\TM_table.sql **/
