/**Begin D:\PDM_UPGRADE_1.4\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_GROUPENTRY', 'T_HRCS_GROUPENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRCS_GROUPENTRY' AND KSQL_INDNAME = 'IDX_HRCS_GROUPENTRY') CREATE INDEX IDX_HRCS_GROUPENTRY ON T_HRCS_GROUPENTRY ( FID );


 EXEC P_ALTERPK 'PK_HRCS_ACTGROUPENTITY', 'T_HRCS_ACTGROUPENTITY', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRCS_ACTGROUPENTITY' AND KSQL_INDNAME = 'IDX_HRCS_ACTGROUPENTITY') CREATE INDEX IDX_HRCS_ACTGROUPENTITY ON T_HRCS_ACTGROUPENTITY ( FENTRYID );


 EXEC P_ALTERPK 'PK_HRCS_GROUPENTRY_L', 'T_HRCS_GROUPENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRCS_GROUPENTRY_L' AND KSQL_INDNAME = 'IDX_HRCS_GROUPENTRY_L') CREATE INDEX IDX_HRCS_GROUPENTRY_L ON T_HRCS_GROUPENTRY_L ( FLOCALEID ,FENTRYID );


 EXEC P_ALTERPK 'PK_HRCS_ACTIVIGPINSENTITY', 'T_HRCS_ACTIVIGPINSENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRCS_ACTIVIGPINSENTITY' AND KSQL_INDNAME = 'IDX_HRCS_ACTIVIGPINSENTITY') CREATE INDEX IDX_HRCS_ACTIVIGPINSENTITY ON T_HRCS_ACTIVIGPINSENTITY ( FID );


 EXEC P_ALTERPK 'PK_HRCS_ACTIVITYGROUPINS_L', 'T_HRCS_ACTIVITYGROUPINS_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRCS_ACTIVITYGROUPINS_L' AND KSQL_INDNAME = 'IDX_HRCS_ACTIVITYGROUPINS_L') CREATE INDEX IDX_HRCS_ACTIVITYGROUPINS_L ON T_HRCS_ACTIVITYGROUPINS_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRCS_ACTIVITYGROUPINS', 'T_HRCS_ACTIVITYGROUPINS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRCS_ACTIVITYGROUPINS' AND KSQL_INDNAME = 'IDX_HRCS_ACTIVITYGROUPINS') CREATE INDEX IDX_HRCS_ACTIVITYGROUPINS ON T_HRCS_ACTIVITYGROUPINS ( FBIZBILLID );



/**End D:\PDM_UPGRADE_1.4\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
