/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANDISPATCH' AND KSQL_COL_NAME ='FFORECASTIDS') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FFORECASTIDS NVARCHAR(1000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANDISPATCH' AND KSQL_COL_NAME ='FFORECASTNO') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FFORECASTNO NVARCHAR(1000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANDISPATCH' AND KSQL_COL_NAME ='FFORECASTLOGID') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FFORECASTLOGID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PEGINFODATAENTRY' AND KSQL_COL_NAME ='FDEMANDBILLF7') 
 ALTER TABLE T_MRP_PEGINFODATAENTRY ADD (FDEMANDBILLF7 NVARCHAR(60) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PEGINFODATAENTRY' AND KSQL_COL_NAME ='FSUPPLYBILLF7') 
 ALTER TABLE T_MRP_PEGINFODATAENTRY ADD (FSUPPLYBILLF7 NVARCHAR(60) DEFAULT ' ' NOT NULL );

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