/**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_BIZ_INFO' AND KSQL_COL_NAME ='FLASTSYNCORGTAMP') 
 ALTER TABLE T_ER_BIZ_INFO ADD (FLASTSYNCORGTAMP VARCHAR(50) DEFAULT '1900-01-01 00:00:00' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_BIZ_INFO' AND KSQL_COL_NAME ='FLASTSYNCORDERBILLTAMP') 
 ALTER TABLE T_ER_BIZ_INFO ADD (FLASTSYNCORDERBILLTAMP VARCHAR(50) DEFAULT '1900-01-01 00:00:00' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_BIZ_INFO' AND KSQL_COL_NAME ='FRESERVEDFIELD3') 
 ALTER TABLE T_ER_BIZ_INFO ADD (FRESERVEDFIELD3 VARCHAR(100) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_BIZ_INFO' AND KSQL_COL_NAME ='FRESERVEDFIELD4') 
 ALTER TABLE T_ER_BIZ_INFO ADD (FRESERVEDFIELD4 VARCHAR(100) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_BIZ_INFO' AND KSQL_COL_NAME ='FRESERVEDFIELD5') 
 ALTER TABLE T_ER_BIZ_INFO ADD (FRESERVEDFIELD5 VARCHAR(100) DEFAULT ' ' NOT NULL );
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql **/
