/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MRP_constraint.sql **/
EXEC p_DropIdx 'IDX_MRP_PEGINFODATAENTRY1', 'T_MRP_PEGINFODATAENTRY';
EXEC p_DropIdx 'IDX_MRP_PEGINFODATAENTRY2', 'T_MRP_PEGINFODATAENTRY';
EXEC p_DropIdx 'IDX_MRP_PEGINFODATAENTRY', 'T_MRP_PEGINFODATAENTRY';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PEGINFODATAENTRY1') CREATE INDEX IDX_MRP_PEGINFODATAENTRY1 ON T_MRP_PEGINFODATAENTRY ( FID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PEGINFODATAENTRY2') CREATE INDEX IDX_MRP_PEGINFODATAENTRY2 ON T_MRP_PEGINFODATAENTRY ( FREQUIREBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PEGINFODATAENTRY3') CREATE INDEX IDX_MRP_PEGINFODATAENTRY3 ON T_MRP_PEGINFODATAENTRY ( FREQUIREMATERIALID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PEGINFODATAENTRY4') CREATE INDEX IDX_MRP_PEGINFODATAENTRY4 ON T_MRP_PEGINFODATAENTRY ( FSUPPLYMATERIALID );

EXEC p_DropIdx 'IDX_MRP_CALDETAILENTRY_SUP', 'T_MRP_CALDETAILENTRY';
EXEC p_DropIdx 'IDX_MRP_CALDETAILENTRY_REQ', 'T_MRP_CALDETAILENTRY';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CALDETAILENTRY_SUP') CREATE INDEX IDX_MRP_CALDETAILENTRY_SUP ON T_MRP_CALDETAILENTRY ( FSUPPLYBILLID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CALDETAILENTRY_REQ') CREATE INDEX IDX_MRP_CALDETAILENTRY_REQ ON T_MRP_CALDETAILENTRY ( FBILLID );


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