/**Begin D:\zhaohui_zeng\PDM_UPGRADE\PDM1\MRP_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MRP_DATESET', 'T_MRP_DATESET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_MRP_DATESET_FNUM') CREATE INDEX IDX_T_MRP_DATESET_FNUM ON T_MRP_DATESET ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_MRP_DATESETENTRY', 'T_MRP_DATESETENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_MRP_DATESETENTRY') CREATE INDEX IDX_T_MRP_DATESETENTRY ON T_MRP_DATESETENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_MRP_PUR_FCTDATA', 'T_MRP_PUR_FCTDATA', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PUR_FCTDATA') CREATE INDEX IDX_MRP_PUR_FCTDATA ON T_MRP_PUR_FCTDATA ( FCACULATELOG );


 EXEC P_ALTERPK 'PK_T_MRP_PUR_FCTENTRY', 'T_MRP_PUR_FCTENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_PUR_FCTENTRY') CREATE INDEX IDX_MRP_PUR_FCTENTRY ON T_MRP_PUR_FCTENTRY ( FID ,FSEQ );



/**End D:\zhaohui_zeng\PDM_UPGRADE\PDM1\MRP_constraint.sql **/
