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

 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 ,FSUPPLYBILLENTRYID );

 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 ,FBILLENTRYID );

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

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

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


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