/**Begin D:\PDM_UPGRADE\pdm1\PLAN_DIMENSION_constraint.sql **/
 EXEC P_ALTERPK 'PK_MSPLAN_PLAN_DIMENSION', 'T_MSPLAN_PLAN_DIMENSION', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_MSPLAN_PLAN_DIMENSION_L', 'T_MSPLAN_PLAN_DIMENSION_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSPLAN_PLAN_DIMENSION_L_FID') CREATE INDEX IDX_MSPLAN_PLAN_DIMENSION_L_FID ON T_MSPLAN_PLAN_DIMENSION_L ( FID , FLOCALEID );


 EXEC P_ALTERPK 'PK_T_MSPLAN_PLAN_DIMENTRY', 'T_MSPLAN_PLAN_DIMENTRY', 'FENTRYID', '1';

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


/**End D:\PDM_UPGRADE\pdm1\PLAN_DIMENSION_constraint.sql **/
