/**Begin C:\Users\rd_zhixiong_w\Downloads\PDM_UPGRADE\PDM1\TM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL_E' AND KSQL_COL_NAME IN ('FSHOW_VOUCHER_PL_PANEL'))
 ALTER TABLE T_TM_BUSINESSBILL_E ADD (FSHOW_VOUCHER_PL_PANEL CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL_E' AND KSQL_COL_NAME IN ('FBUY_LOCAL_FQ'))
 ALTER TABLE T_TM_BUSINESSBILL_E ADD (FBUY_LOCAL_FQ NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL_E' AND KSQL_COL_NAME IN ('FSELL_LOCAL_EXRATE'))
 ALTER TABLE T_TM_BUSINESSBILL_E ADD (FSELL_LOCAL_EXRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL_E' AND KSQL_COL_NAME IN ('FSELL_LOCAL_FQ'))
 ALTER TABLE T_TM_BUSINESSBILL_E ADD (FSELL_LOCAL_FQ NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL_E' AND KSQL_COL_NAME IN ('FBUY_LOCAL_EXRATE'))
 ALTER TABLE T_TM_BUSINESSBILL_E ADD (FBUY_LOCAL_EXRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL_E' AND KSQL_COL_NAME IN ('FVOUCHER_PL'))
 ALTER TABLE T_TM_BUSINESSBILL_E ADD (FVOUCHER_PL DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL_E' AND KSQL_COL_NAME IN ('FFQ'))
 ALTER TABLE T_TM_BUSINESSBILL_E ADD (FFQ NVARCHAR(50) DEFAULT ' ' NOT NULL );

/**End C:\Users\rd_zhixiong_w\Downloads\PDM_UPGRADE\PDM1\TM_table.sql **/

/**Begin C:\Users\rd_zhixiong_w\Downloads\PDM_UPGRADE\PDM1\TM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TM_BUSINESSBILL' AND KSQL_COL_NAME IN ('FABSSETTLEAMT'))
 ALTER TABLE T_TM_BUSINESSBILL ADD (FABSSETTLEAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End C:\Users\rd_zhixiong_w\Downloads\PDM_UPGRADE\PDM1\TM_table.sql **/


