/**Begin D:\PDM_UPGRADE\PDM1\HBSS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HBSS_LAWENTITY', 'T_HBSS_LAWENTITY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LAWENTITY_L', 'T_HBSS_LAWENTITY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LAWENTITYVRINF', 'T_HBSS_LAWENTITYVRINF', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LAWENTITYVRINF_L', 'T_HBSS_LAWENTITYVRINF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LAWENTITYUSE', 'T_HBSS_LAWENTITYUSE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LAWENTITYUSE_L', 'T_HBSS_LAWENTITYUSE_L', 'FPKID', '1';

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



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