/**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 ='FFORECASTLOGNUMBER') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FFORECASTLOGNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANDISPATCH' AND KSQL_COL_NAME ='FDSPNUMBER') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FDSPNUMBER NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANDISPATCH' AND KSQL_COL_NAME ='FDPSNAME') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FDPSNAME NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANDISPATCH' AND KSQL_COL_NAME ='FDSPLOG') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FDSPLOG NVARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLANDISPATCH' AND KSQL_COL_NAME ='FDPSRUNSTATUS') 
 ALTER TABLE T_MRP_PLANDISPATCH ADD (FDPSRUNSTATUS NVARCHAR(255) DEFAULT ' ' NOT NULL );

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