/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
 EXEC P_ALTERPK 'PK_MSPLAN_PLANSCOPEINIT', 'T_MSPLAN_PLANSCOPEINIT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_PLANSCOPEINIT_ST') CREATE INDEX IDX_MSPLAN_PLANSCOPEINIT_ST ON T_MSPLAN_PLANSCOPEINIT ( FINITSTATUS );


 EXEC P_ALTERPK 'PK_MSPLAN_PLANSCOPEINIT_E', 'T_MSPLAN_PLANSCOPEINIT_E', 'FENTRYID', '1';

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



/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
