/**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_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FPROJECTID') 
 ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FPROJECTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYLOANDETAIL' AND KSQL_COL_NAME ='FPROJECTID') 
 ALTER TABLE T_ER_DAILYLOANDETAIL ADD (FPROJECTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REQTRIPENTRY' AND KSQL_COL_NAME ='FPROJECTID') 
 ALTER TABLE T_ER_REQTRIPENTRY ADD (FPROJECTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSETRIPENTRY' AND KSQL_COL_NAME ='FPROJECTID') 
 ALTER TABLE T_ER_REIMBURSETRIPENTRY ADD (FPROJECTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL' AND KSQL_COL_NAME ='FPROJECTID')
 ALTER TABLE T_ER_EXPENSEDETAIL ADD (FPROJECTID BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REPAYMENTENTRY' AND KSQL_COL_NAME ='FPROJECTID')
 ALTER TABLE T_ER_REPAYMENTENTRY ADD (FPROJECTID BIGINT DEFAULT 0 NOT NULL );

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