/**Begin D:\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERDIM', 'T_HRCS_PINITDEMOUSERDIM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITDEMOUSERDIM') CREATE INDEX IDX_HRCS_PINITDEMOUSERDIM ON T_HRCS_PINITDEMOUSERDIM ( FSCENEID );


 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERFLD_L', 'T_HRCS_PINITDEMOUSERFLD_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERBD', 'T_HRCS_PINITDEMOUSERBD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITDEMOUSERBD') CREATE INDEX IDX_HRCS_PINITDEMOUSERBD ON T_HRCS_PINITDEMOUSERBD ( FSCENEID );


 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERDR_L', 'T_HRCS_PINITDEMOUSERDR_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERDR', 'T_HRCS_PINITDEMOUSERDR', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITDEMOUSERDR') CREATE INDEX IDX_HRCS_PINITDEMOUSERDR ON T_HRCS_PINITDEMOUSERDR ( FSCENEID );


 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERBD_L', 'T_HRCS_PINITDEMOUSERBD_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERDIM_L', 'T_HRCS_PINITDEMOUSERDIM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITDEMOUSERFLD', 'T_HRCS_PINITDEMOUSERFLD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITDEMOUSERFLD') CREATE INDEX IDX_HRCS_PINITDEMOUSERFLD ON T_HRCS_PINITDEMOUSERFLD ( FSCENEID );



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