/**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_VEHICLEBILL_A' AND KSQL_COL_NAME ='FSERVICEFEEPAYTYPE') 
 ALTER TABLE T_ER_VEHICLEBILL_A ADD (FSERVICEFEEPAYTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_VEHICLEBILL_A' AND KSQL_COL_NAME ='FPERSONALFEE') 
 ALTER TABLE T_ER_VEHICLEBILL_A ADD (FPERSONALFEE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_HOTELBILL' AND KSQL_COL_NAME ='FSERVICEFEEPAYTYPE') 
 ALTER TABLE T_ER_HOTELBILL ADD (FSERVICEFEEPAYTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_HOTELBILL' AND KSQL_COL_NAME ='FPERSONALFEE') 
 ALTER TABLE T_ER_HOTELBILL ADD (FPERSONALFEE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_HOTELCHECKINGBILL' AND KSQL_COL_NAME ='FSERVICEFEEPAYTYPE') 
 ALTER TABLE T_ER_HOTELCHECKINGBILL ADD (FSERVICEFEEPAYTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_HOTELCHECKINGBILL' AND KSQL_COL_NAME ='FPERSONALFEE') 
 ALTER TABLE T_ER_HOTELCHECKINGBILL ADD (FPERSONALFEE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_VEHICLECHECKINGBILL_A' AND KSQL_COL_NAME ='FSERVICEFEEPAYTYPE') 
 ALTER TABLE T_ER_VEHICLECHECKINGBILL_A ADD (FSERVICEFEEPAYTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_VEHICLECHECKINGBILL_A' AND KSQL_COL_NAME ='FPERSONALFEE') 
 ALTER TABLE T_ER_VEHICLECHECKINGBILL_A ADD (FPERSONALFEE DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PLANECHECKINGBILL' AND KSQL_COL_NAME ='FAIRLINENAME') 
 ALTER TABLE T_ER_PLANECHECKINGBILL ADD (FAIRLINENAME VARCHAR(100) DEFAULT ' ' NOT NULL );  
 
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql **/
