-- 商旅订单 商旅结算 用车 用餐 申请单  增加成本中心字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_VEHICLECHECKINGBILL_A' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_VEHICLECHECKINGBILL_A ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PLANECHECKINGBILL_A' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_PLANECHECKINGBILL_A ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINCHECKINGBILL_A' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_TRAINCHECKINGBILL_A ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_HOTELCHECKINGBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_HOTELCHECKINGBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_HOTELBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_HOTELBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_TRAINBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PLANEBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_PLANEBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYVEHICLEBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_DAILYVEHICLEBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_MEALCHECKINGBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_MEALCHECKINGBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_MEALAPPLICATION_BILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_MEALAPPLICATION_BILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_VEHICLEBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_VEHICLEBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_MEALBILL' AND KSQL_COL_NAME ='FSTDCOSTCENTERID') 
 ALTER TABLE T_ER_MEALBILL ADD (FSTDCOSTCENTERID BIGINT DEFAULT 0 NOT NULL );