
 EXEC P_ALTERPK 'PK_T_HRCS_WARNOBJECTTPL', 'T_HRCS_WARNOBJECTTPL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_WARNOBJECTTPL_L', 'T_HRCS_WARNOBJECTTPL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_HRCS_WARNOBJECTENTITY', 'T_HRCS_WARNOBJECTENTITY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_WARNOBJECTENTITY') CREATE INDEX IDX_HRCS_WARNOBJECTENTITY ON T_HRCS_WARNOBJECTENTITY ( FENTITYNUMBER );

  EXEC P_ALTERPK 'PK_T_HRCS_WARNOBJECTENTITY_L', 'T_HRCS_WARNOBJECTENTITY_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_T_HRCS_WARNOBJECTRELATION', 'T_HRCS_WARNOBJECTRELATION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_WARNOBJECTRELATION') CREATE INDEX IDX_HRCS_WARNOBJECTRELATION ON T_HRCS_WARNOBJECTRELATION ( FJOINENTITYID );


 EXEC P_ALTERPK 'PK_T_HRCS_WARNOBJECTRELCON', 'T_HRCS_WARNOBJECTRELCON', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_HRCS_WARNOBJECTFIELD', 'T_HRCS_WARNOBJECTFIELD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_WARNOBJECTFIELD') CREATE INDEX IDX_HRCS_WARNOBJECTFIELD ON T_HRCS_WARNOBJECTFIELD ( FENTITYNUMBER );


 EXEC P_ALTERPK 'PK_T_HRCS_WARNOBJECTFIELD_L', 'T_HRCS_WARNOBJECTFIELD_L', 'FPKID', '1';

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