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

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


 EXEC P_ALTERPK 'PK_HRCS_DYNAPUBLISHERDS', 'T_HRCS_DYNAPUBLISHERDS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNAPUBLISHERS', 'T_HRCS_DYNAPUBLISHERS', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_DYNAPUBLISHERS') CREATE INDEX IDX_HRCS_DYNAPUBLISHERS ON T_HRCS_DYNAPUBLISHERS ( FID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_HRCS_DYNAPUBLISHERPAR', 'T_HRCS_DYNAPUBLISHERPAR', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNAPUBLISHERDS_L', 'T_HRCS_DYNAPUBLISHERDS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNAFORMULA_L', 'T_HRCS_DYNAFORMULA_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNAFORMULA', 'T_HRCS_DYNAFORMULA', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNADSPERSONITEM', 'T_HRCS_DYNADSPERSONITEM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNADSPERSONITEM_L', 'T_HRCS_DYNADSPERSONITEM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNASEARCHSCENEA', 'T_HRCS_DYNASEARCHSCENEA', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_DYNASEARCHSCENEA') CREATE INDEX IDX_HRCS_DYNASEARCHSCENEA ON T_HRCS_DYNASEARCHSCENEA ( FID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_HRCS_DYNASEARCHSCENEC', 'T_HRCS_DYNASEARCHSCENEC', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_DYNASEARCHSCENEC') CREATE INDEX IDX_HRCS_DYNASEARCHSCENEC ON T_HRCS_DYNASEARCHSCENEC ( FID ,FBASEDATAID );

 
 EXEC P_ALTERPK 'PK_HRCS_DYNADSPARAMENTITY', 'T_HRCS_DYNADSPARAMENTITY', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_DYNADSPARAMENTITY_L', 'T_HRCS_DYNADSPARAMENTITY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_DYNADSPARAMENTITY_L') CREATE INDEX IDX_HRCS_DYNADSPARAMENTITY_L ON T_HRCS_DYNADSPARAMENTITY_L ( FLOCALEID ,FDETAILID );

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

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