/**Begin D:\pdm\PDM_UPGRADE\PDM1\HRPTMC_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_HRPTMC_CUSTOMSORT', 'T_HRPTMC_CUSTOMSORT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTMC_CUSTOMSORT') CREATE INDEX IDX_HRPTMC_CUSTOMSORT ON T_HRPTMC_CUSTOMSORT ( FRPTMANAGEID );


 EXEC P_ALTERPK 'PK_T_HRPTMC_CUSTOMSORTETY', 'T_HRPTMC_CUSTOMSORTETY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_HRPTMC_COMMONSORT', 'T_HRPTMC_COMMONSORT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRPTMC_COMMONSORT') CREATE INDEX IDX_HRPTMC_COMMONSORT ON T_HRPTMC_COMMONSORT ( FENTITYNUMBER ,FENTITYFIELD ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_HRPTMC_COMMONSORTETY', 'T_HRPTMC_COMMONSORTETY', 'FENTRYID', '1';

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



/**End D:\pdm\PDM_UPGRADE\PDM1\HRPTMC_constraint.sql **/
