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

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEBASE_L', 'T_HRCS_PINITROLEBASE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEDATA_L', 'T_HRCS_PINITROLEDATA_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITSCOPEEDIT', 'T_HRCS_PINITSCOPEEDIT', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEDIM', 'T_HRCS_PINITROLEDIM', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEFUNC_L', 'T_HRCS_PINITROLEFUNC_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEDATAVAL', 'T_HRCS_PINITROLEDATAVAL', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEFIELD', 'T_HRCS_PINITROLEFIELD', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEBASE', 'T_HRCS_PINITROLEBASE', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEDIM_L', 'T_HRCS_PINITROLEDIM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEFIELD_L', 'T_HRCS_PINITROLEFIELD_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEFUNC', 'T_HRCS_PINITROLEFUNC', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_PINITROLEDATA', 'T_HRCS_PINITROLEDATA', 'FENTRYID', '1';

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

 EXEC P_ALTERPK 'PK_HRCS_PINITROLEORG', 'T_HRCS_PINITROLEORG', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_PINITROLEORG') CREATE INDEX IDX_HRCS_PINITROLEORG ON T_HRCS_PINITROLEORG ( FENTRYID ,FBASEDATAID );
 
EXEC p_AlterPK 'PK_HRCS_ACTSCHEMEREF', 'T_HRCS_ACTSCHEMEREF', 'FPKID', '1';
EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_DIM', 'T_HRCS_ROLEINITDEMO_DIM', 'FID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_DIM_L', 'T_HRCS_ROLEINITDEMO_DIM_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_DIMET', 'T_HRCS_ROLEINITDEMO_DIMET', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_DR', 'T_HRCS_ROLEINITDEMO_DR', 'FID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_DR_L', 'T_HRCS_ROLEINITDEMO_DR_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_FC', 'T_HRCS_ROLEINITDEMO_FC', 'FID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_FC_L', 'T_HRCS_ROLEINITDEMO_FC_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_FCET', 'T_HRCS_ROLEINITDEMO_FCET', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_FP', 'T_HRCS_ROLEINITDEMO_FP', 'FID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_FP_L', 'T_HRCS_ROLEINITDEMO_FP_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_ROLE', 'T_HRCS_ROLEINITDEMO_ROLE', 'FID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_ROLE_L', 'T_HRCS_ROLEINITDEMO_ROLE_L', 'FPKID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_DIME', 'T_HRCS_ROLEINITDEMO_DIME', 'FENTRYID', '1';

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

EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_DIME_L', 'T_HRCS_ROLEINITDEMO_DIME_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_HRCS_ROLEINITDEMO_FCET_L', 'T_HRCS_ROLEINITDEMO_FCET_L', 'FPKID', '1';

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

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