/**Begin D:\tool\PDM\PDM_UPGRADE_1.3\PDM_UPGRADE\PDM1\ER_table.sql **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEPOOLBILL' AND KSQL_COL_NAME ='FTARGETBILLNO') 
 ALTER TABLE T_ER_EXPENSEPOOLBILL ADD (FTARGETBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEPOOLBILL' AND KSQL_COL_NAME ='FTRIPDATEAREATEXT') 
 ALTER TABLE T_ER_EXPENSEPOOLBILL ADD (FTRIPDATEAREATEXT VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEPOOLBILL' AND KSQL_COL_NAME ='FINVOICETOTALCOUNT') 
 ALTER TABLE T_ER_EXPENSEPOOLBILL ADD (FINVOICETOTALCOUNT INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEPOOLBILL' AND KSQL_COL_NAME ='FTARGETBILLCURRENCY') 
 ALTER TABLE T_ER_EXPENSEPOOLBILL ADD (FTARGETBILLCURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEPOOLBILL' AND KSQL_COL_NAME ='FEXCHANGERATE') 
 ALTER TABLE T_ER_EXPENSEPOOLBILL ADD (FEXCHANGERATE DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End D:\tool\PDM\PDM_UPGRADE_1.3\PDM_UPGRADE\PDM1\ER_table.sql **/
