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


-- EXEC p_AlterColumn 'T_MRP_CACULATELOGENTRY', 'FSTEPSEQ', 'NVARCHAR(100)', 'NOT NULL', '1111', ''' ''';

-- EXEC p_AlterColumn 'T_MRP_CACULATELOGENTRY', 'FSTEPNAME', 'NVARCHAR(200)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_MRP_CACULATELOGENTRY', 'FPROCESSDATA', 'BIGINT', 'NOT NULL', '1111', '0';

 EXEC p_AlterColumn 'T_MRP_CACULATELOGENTRY', 'FRESULT', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_MRP_CACULATELOGENTRY', 'FDETAILMSG', 'NVARCHAR(255)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_MRP_CACULATELOGENTRY', 'FDETAILMSG_TAG', 'NCLOB', 'NULL', '0001', 'NULL';

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


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