/**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_INVOICEINFOCP' AND KSQL_COL_NAME ='FCUSTOMERIDNUMBER') 
 ALTER TABLE T_ER_INVOICEINFOCP ADD (FCUSTOMERIDNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEPOOLINFO' AND KSQL_COL_NAME ='FCUSTOMERIDNUMBER') 
 ALTER TABLE T_ER_INVOICEPOOLINFO ADD (FCUSTOMERIDNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMINVOICEINFO' AND KSQL_COL_NAME ='FCUSTOMERIDNUMBER') 
 ALTER TABLE T_ER_PUBREIMINVOICEINFO ADD (FCUSTOMERIDNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEINFO' AND KSQL_COL_NAME ='FCUSTOMERIDNUMBER') 
 ALTER TABLE T_ER_INVOICEINFO ADD (FCUSTOMERIDNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );

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