/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_table.sql **/
 EXEC p_AlterColumn 'T_MRP_PLANDISPATCH', 'FREQPLANNUMBER', 'NVARCHAR(2000)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_MRP_PLANDISPATCH', 'FREQPLANNAME', 'NVARCHAR(2000)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_MRP_PLANDISPATCH', 'FREQPLANID', 'NVARCHAR(2000)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_MRP_PLANDISPATCH', 'FREQPLANLOG1', 'NVARCHAR(2000)', 'NOT NULL', '0100', ''' ''';

 EXEC p_AlterColumn 'T_MRP_PLANDISPATCH', 'FFORECASTNO', 'NVARCHAR(2000)', 'NOT NULL', '0100', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_CALDETAILENTRY_E' AND KSQL_COL_NAME ='FDEMANDSOURCETYPE') 
 ALTER TABLE T_MRP_CALDETAILENTRY_E ADD (FDEMANDSOURCETYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );

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