/**Begin C:\Users\RD_jerry_wz_wang\Desktop\PDM_UPGRADE\pdm1\MRP_constraint.sql **/
 EXEC P_ALTERPK 'PK_MRP_CPS_RESULTDATAS2', 'T_MRP_CPS_RESULTDATAS2', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CPS_RESULTDATAS2_ID') CREATE INDEX IDX_MRP_CPS_RESULTDATAS2_ID ON T_MRP_CPS_RESULTDATAS2 ( FID );


 EXEC P_ALTERPK 'PK_MRP_CPS_RESULTDATAS1', 'T_MRP_CPS_RESULTDATAS1', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MRP_CPS_RESULTDATAS1_ID') CREATE INDEX IDX_MRP_CPS_RESULTDATAS1_ID ON T_MRP_CPS_RESULTDATAS1 ( FID );


 EXEC P_ALTERPK 'PK_MRP_CPS_RESULTDATAS', 'T_MRP_CPS_RESULTDATAS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CPS_RESULTDATAS') CREATE INDEX IDX_CPS_RESULTDATAS ON T_MRP_CPS_RESULTDATAS ( FRUNLOGNUMBER );



/**End C:\Users\RD_jerry_wz_wang\Desktop\PDM_UPGRADE\pdm1\MRP_constraint.sql **/
