/**Begin D:\PDM_UPGRADE\PDM_NEW\HPDI_constraint.sql **/
 EXEC P_ALTERPK 'PK_HPDI_COLLARULECDM', 'T_HPDI_COLLARULECDM', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_COLLARULECDM02') CREATE INDEX IDX_HPDI_COLLARULECDM02 ON T_HPDI_COLLARULECDM ( FBOID );


 EXEC P_ALTERPK 'PK_HPDI_COLLARULECDM_L', 'T_HPDI_COLLARULECDM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_COLLARULECSI', 'T_HPDI_COLLARULECSI', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_COLLARULECSI02') CREATE INDEX IDX_HPDI_COLLARULECSI02 ON T_HPDI_COLLARULECSI ( FBOID );


 EXEC P_ALTERPK 'PK_HPDI_COLLARULESAL', 'T_HPDI_COLLARULESAL', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_COLLARULESAL2') CREATE INDEX IDX_HPDI_COLLARULESAL2 ON T_HPDI_COLLARULESAL ( FBOID );


 EXEC P_ALTERPK 'PK_HPDI_COLLARULESAL_L', 'T_HPDI_COLLARULESAL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_COLLARULETAX_L', 'T_HPDI_COLLARULETAX_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_CRCSIFRDETAIL', 'T_HPDI_CRCSIFRDETAIL', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_CRSALENT', 'T_HPDI_CRSALENT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_CRSALENT') CREATE INDEX IDX_HPDI_CRSALENT ON T_HPDI_CRSALENT ( FPAYROLLACTID );


 EXEC P_ALTERPK 'PK_HPDI_CRSALFMDETAIL', 'T_HPDI_CRSALFMDETAIL', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_CRTAXFRDETAIL', 'T_HPDI_CRTAXFRDETAIL', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_CRCDMFRDETAIL', 'T_HPDI_CRCDMFRDETAIL', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_CRSALFRDETAIL', 'T_HPDI_CRSALFRDETAIL', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_CRSALFMOBJ', 'T_HPDI_CRSALFMOBJ', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_CRSALFMOBJ') CREATE INDEX IDX_HPDI_CRSALFMOBJ ON T_HPDI_CRSALFMOBJ ( FDETAILID );


 EXEC P_ALTERPK 'PK_HPDI_COLLARULECSI_L', 'T_HPDI_COLLARULECSI_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HPDI_CRCDMENT', 'T_HPDI_CRCDMENT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_CRCDMENT') CREATE INDEX IDX_HPDI_CRCDMENT ON T_HPDI_CRCDMENT ( FPAYROLLACTID );


 EXEC P_ALTERPK 'PK_HPDI_CRCSIENT', 'T_HPDI_CRCSIENT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_CRCSIENT') CREATE INDEX IDX_HPDI_CRCSIENT ON T_HPDI_CRCSIENT ( FPAYROLLACTID );


 EXEC P_ALTERPK 'PK_HPDI_CRTAXENT', 'T_HPDI_CRTAXENT', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_CRTAXENT') CREATE INDEX IDX_HPDI_CRTAXENT ON T_HPDI_CRTAXENT ( FPAYROLLACTID );


 EXEC P_ALTERPK 'PK_HPDI_COLLARULETAX', 'T_HPDI_COLLARULETAX', 'FID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HPDI_COLLARULETAX02') CREATE INDEX IDX_HPDI_COLLARULETAX02 ON T_HPDI_COLLARULETAX ( FBOID );


/**End D:\PDM_UPGRADE\PDM_NEW\HPDI_constraint.sql **/
