/** 结算表添加差旅壹号期间字段  **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_ALLCHECKINGBILL' AND KSQL_COL_NAME ='FBILLPERIOD') 
ALTER TABLE T_ER_ALLCHECKINGBILL ADD (FBILLPERIOD DATETIME);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PLANECHECKINGBILL' AND KSQL_COL_NAME ='FBILLPERIOD') 
ALTER TABLE T_ER_PLANECHECKINGBILL ADD (FBILLPERIOD DATETIME);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_VEHICLECHECKINGBILL_A' AND KSQL_COL_NAME ='FBILLPERIOD') 
ALTER TABLE T_ER_VEHICLECHECKINGBILL_A ADD (FBILLPERIOD DATETIME);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINCHECKINGBILL_A' AND KSQL_COL_NAME ='FBILLPERIOD') 
ALTER TABLE T_ER_TRAINCHECKINGBILL_A ADD (FBILLPERIOD DATETIME);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_HOTELCHECKINGBILL' AND KSQL_COL_NAME ='FBILLPERIOD') 
ALTER TABLE T_ER_HOTELCHECKINGBILL ADD (FBILLPERIOD DATETIME);
