/**Begin D:\PDM_UPGRADE\PDM1\HLCM_constraint.sql **/
 EXEC P_ALTERPK 'PK_HBSS_CONTRACTTYPES', 'T_HBSS_CONTRACTTYPES', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_CONTRACTTYPES_L', 'T_HBSS_CONTRACTTYPES_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SIGNCOMPANY', 'T_HBSS_SIGNCOMPANY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SIGNCOMPANY_L', 'T_HBSS_SIGNCOMPANY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_CONTRACTTYPECAT_L', 'T_HBSS_CONTRACTTYPECAT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SIGNCOMPANYENTITY', 'T_HBSS_SIGNCOMPANYENTITY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SIGNCOMPANYHIS', 'T_HBSS_SIGNCOMPANYHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SIGNCOMPANYHIS_L', 'T_HBSS_SIGNCOMPANYHIS_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_SIGNCOMPANYHIS_L') CREATE INDEX IDX_HBSS_SIGNCOMPANYHIS_L ON T_HBSS_SIGNCOMPANYHIS_L ( FVID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HBSS_CONTRACTTYPECAT', 'T_HBSS_CONTRACTTYPECAT', 'FID', '1';

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



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