/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql  火车结算单增加字段**/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINCHECKINGBILL_A' AND KSQL_COL_NAME ='FVENDORNAME') 
 ALTER TABLE T_ER_TRAINCHECKINGBILL_A ADD (FVENDORNAME VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINCHECKINGBILL_A' AND KSQL_COL_NAME ='FTRAINSEAT') 
 ALTER TABLE T_ER_TRAINCHECKINGBILL_A ADD (FTRAINSEAT VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINCHECKINGBILL_A' AND KSQL_COL_NAME ='FTICKETPRICE') 
 ALTER TABLE T_ER_TRAINCHECKINGBILL_A ADD (FTICKETPRICE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINCHECKINGBILL_A' AND KSQL_COL_NAME ='FREFUNDAMOUNT') 
 ALTER TABLE T_ER_TRAINCHECKINGBILL_A ADD (FREFUNDAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRAINCHECKINGBILL_A' AND KSQL_COL_NAME ='FASSURANCEAMOUNT') 
 ALTER TABLE T_ER_TRAINCHECKINGBILL_A ADD (FASSURANCEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql **/
