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

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFHANDLERPARAM', 'T_HBSS_DIFFHANDLERPARAM', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFHANDLER_L', 'T_HBSS_DIFFHANDLER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFHANDLERPARAM_L', 'T_HBSS_DIFFHANDLERPARAM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFIMPLEMENT', 'T_HBSS_DIFFIMPLEMENT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFIMPLEMENT_L', 'T_HBSS_DIFFIMPLEMENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFIMPLMETHOD', 'T_HBSS_DIFFIMPLMETHOD', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFIMPLPARAM', 'T_HBSS_DIFFIMPLPARAM', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFIMPLMETHOD_L', 'T_HBSS_DIFFIMPLMETHOD_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFIMPLPARAM_L', 'T_HBSS_DIFFIMPLPARAM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFCUSCONFIG', 'T_HBSS_DIFFCUSCONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_DIFFCUSCONFIG') CREATE INDEX IDX_HBSS_DIFFCUSCONFIG ON T_HBSS_DIFFCUSCONFIG ( FDIFFHANDLERID );


 EXEC P_ALTERPK 'PK_HBSS_DIFFCUSCONFIG_L', 'T_HBSS_DIFFCUSCONFIG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIFFPROJAOPCONFIG', 'T_HBSS_DIFFPROJAOPCONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_DIFFPROJAOPCONFIG') CREATE INDEX IDX_HBSS_DIFFPROJAOPCONFIG ON T_HBSS_DIFFPROJAOPCONFIG ( FCREATORID );


 EXEC P_ALTERPK 'PK_HBSS_DIFFAOPSCOPECONF', 'T_HBSS_DIFFAOPSCOPECONF', 'FENTRYID', '1';

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



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