/**Begin D:\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_PINITUSERDIM_L', 'T_HRCS_PINITUSERDIM_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITUSERDIM_L') CREATE INDEX IDX_HRCS_PINITUSERDIM_L ON T_HRCS_PINITUSERDIM_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERFIELD_L', 'T_HRCS_PINITUSERFIELD_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITUSERFIELD_L') CREATE INDEX IDX_HRCS_PINITUSERFIELD_L ON T_HRCS_PINITUSERFIELD_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRCS_PINITDRPERMITEM', 'T_HRCS_PINITDRPERMITEM', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITDRPERMITEM') CREATE INDEX IDX_HRCS_PINITDRPERMITEM ON T_HRCS_PINITDRPERMITEM ( FENTRYID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERDIMVAL', 'T_HRCS_PINITUSERDIMVAL', 'FDETAILID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITUSERDIMVAL') CREATE INDEX IDX_HRCS_PINITUSERDIMVAL ON T_HRCS_PINITUSERDIMVAL ( FENTRYID );


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERFIELD', 'T_HRCS_PINITUSERFIELD', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITRECORD_L', 'T_HRCS_PINITRECORD_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERDIM', 'T_HRCS_PINITUSERDIM', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITRECORD', 'T_HRCS_PINITRECORD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERDR_L', 'T_HRCS_PINITUSERDR_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITUSERDR_L') CREATE INDEX IDX_HRCS_PINITUSERDR_L ON T_HRCS_PINITUSERDR_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERORG', 'T_HRCS_PINITUSERORG', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITUSERORG') CREATE INDEX IDX_HRCS_PINITUSERORG ON T_HRCS_PINITUSERORG ( FENTRYID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERDR', 'T_HRCS_PINITUSERDR', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERBD', 'T_HRCS_PINITUSERBD', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITUSERBD_L', 'T_HRCS_PINITUSERBD_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITUSERBD_L') CREATE INDEX IDX_HRCS_PINITUSERBD_L ON T_HRCS_PINITUSERBD_L ( FENTRYID ,FLOCALEID );



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