/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HBSS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HBSS_BURELATION_L', 'T_HBSS_BURELATION_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BURELATION', 'T_HBSS_BURELATION', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EVENTALL_L', 'T_HBSS_EVENTALL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EVENTSTRATEGY_L', 'T_HBSS_EVENTSTRATEGY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EVENTLIST_L', 'T_HBSS_EVENTLIST_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EVENTSTRATEGY', 'T_HBSS_EVENTSTRATEGY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EVENTALL', 'T_HBSS_EVENTALL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EVENTALL') CREATE INDEX IDX_HBSS_EVENTALL ON T_HBSS_EVENTALL ( FEVENTID );


 EXEC P_ALTERPK 'PK_HBSS_EVENTLIST', 'T_HBSS_EVENTLIST', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_AFFAIRSCATEGORY_L', 'T_HBSS_AFFAIRSCATEGORY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_AFFAIRSTYPE_L', 'T_HBSS_AFFAIRSTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_AFFAIRSCATEGORY', 'T_HBSS_AFFAIRSCATEGORY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_AFFAIRSTYPE', 'T_HBSS_AFFAIRSTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_FILEMAPMANAGER_L', 'T_HBSS_FILEMAPMANAGER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_MAPPEDFIELD', 'T_HBSS_MAPPEDFIELD', 'FDETAILID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_MAPPEDTABLE', 'T_HBSS_MAPPEDTABLE', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_MAPPEDTABLE') CREATE INDEX IDX_HBSS_MAPPEDTABLE ON T_HBSS_MAPPEDTABLE ( FSOURCEENTITYID ,FID );


 EXEC P_ALTERPK 'PK_HBSS_FILESYNCCONF_L', 'T_HBSS_FILESYNCCONF_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_FILESYNCFIELD', 'T_HBSS_FILESYNCFIELD', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_FILESYNCFIELD') CREATE INDEX IDX_HBSS_FILESYNCFIELD ON T_HBSS_FILESYNCFIELD ( FPREFILEFIELD ,FID );


 EXEC P_ALTERPK 'PK_HBSS_FILEMAPMANAGER', 'T_HBSS_FILEMAPMANAGER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_FILEMAPMANAGER') CREATE INDEX IDX_HBSS_FILEMAPMANAGER ON T_HBSS_FILEMAPMANAGER ( FAFFAIRSTYPEID );


 EXEC P_ALTERPK 'PK_HBSS_FILESYNCCONF', 'T_HBSS_FILESYNCCONF', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_FILESYNCCONF') CREATE INDEX IDX_HBSS_FILESYNCCONF ON T_HBSS_FILESYNCCONF ( FPREFILETABLE ,FEMPFILETABLE );


 EXEC P_ALTERPK 'PK_HBSS_HRBUBATYPE_L', 'T_HBSS_HRBUBATYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUCA_L', 'T_HBSS_HRBUCA_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUCAVIEW_L', 'T_HBSS_HRBUCAVIEW_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUCAVIEWSTRUCT_L', 'T_HBSS_HRBUCAVIEWSTRUCT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUSTRUCT_L', 'T_HBSS_HRBUSTRUCT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBU_L', 'T_HBSS_HRBU_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUEXT_L', 'T_HBSS_HRBUEXT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUVIEWEXT_L', 'T_HBSS_HRBUVIEWEXT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUCAFUNC_L', 'T_HBSS_HRBUCAFUNC_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUSINESSFIELD_L', 'T_HBSS_HRBUSINESSFIELD_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_APPBUSINESSTYPE_L', 'T_HBSS_APPBUSINESSTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUBATYPE', 'T_HBSS_HRBUBATYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUCAVIEWSTRUCT', 'T_HBSS_HRBUCAVIEWSTRUCT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_HRBUCAVIEWSTRUCT') CREATE INDEX IDX_HBSS_HRBUCAVIEWSTRUCT ON T_HBSS_HRBUCAVIEWSTRUCT ( FHRBUID );


 EXEC P_ALTERPK 'PK_HBSS_HRBUCAVIEW', 'T_HBSS_HRBUCAVIEW', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUSTRUCT', 'T_HBSS_HRBUSTRUCT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_HRBUSTRUCT') CREATE INDEX IDX_HBSS_HRBUSTRUCT ON T_HBSS_HRBUSTRUCT ( FHRBUID );


 EXEC P_ALTERPK 'PK_HBSS_HRBU', 'T_HBSS_HRBU', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUEXT', 'T_HBSS_HRBUEXT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_HRBUEXT') CREATE INDEX IDX_HBSS_HRBUEXT ON T_HBSS_HRBUEXT ( FBOSORGID );


 EXEC P_ALTERPK 'PK_HBSS_HRBUVIEWEXT', 'T_HBSS_HRBUVIEWEXT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_HRBUVIEWEXT') CREATE INDEX IDX_HBSS_HRBUVIEWEXT ON T_HBSS_HRBUVIEWEXT ( FBOSORGSTRUCTUREID );


 EXEC P_ALTERPK 'PK_HBSS_HRBUCAFUNC', 'T_HBSS_HRBUCAFUNC', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUSINESSFIELD', 'T_HBSS_HRBUSINESSFIELD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_APPBUSINESSTYPE', 'T_HBSS_APPBUSINESSTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HRBUCA', 'T_HBSS_HRBUCA', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HISTORYREGISTER_L', 'T_HBSS_HISTORYREGISTER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_COMPHISENTITY_L', 'T_HBSS_COMPHISENTITY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HISTORYREGISTER', 'T_HBSS_HISTORYREGISTER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_HISTORYREGISTER') CREATE INDEX IDX_HBSS_HISTORYREGISTER ON T_HBSS_HISTORYREGISTER ( FHISTORYTYPE );


 EXEC P_ALTERPK 'PK_HBSS_COMPHISENTITY', 'T_HBSS_COMPHISENTITY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DUTYWORKROLES_L', 'T_HBSS_DUTYWORKROLES_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DUTYWORKROLESHIS_L', 'T_HBSS_DUTYWORKROLESHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DUTYWORKROLESHIS_H', 'T_HBSS_DUTYWORKROLESHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_DUTYWORKROLESHIS_H') CREATE INDEX IDX_HBSS_DUTYWORKROLESHIS_H ON T_HBSS_DUTYWORKROLESHIS_H ( FBRED );


 EXEC P_ALTERPK 'PK_HBSS_DUTYWORKROLES', 'T_HBSS_DUTYWORKROLES', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DUTYWORKROLESHIS', 'T_HBSS_DUTYWORKROLESHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGTEAM_L', 'T_HBSS_ORGTEAM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGTEAMHIS_L', 'T_HBSS_ORGTEAMHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGTEAMHIS_H', 'T_HBSS_ORGTEAMHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGTEAMHIS_H') CREATE INDEX IDX_HBSS_ORGTEAMHIS_H ON T_HBSS_ORGTEAMHIS_H ( FBRED );


 EXEC P_ALTERPK 'PK_HBSS_ORGTEAM', 'T_HBSS_ORGTEAM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGTEAMHIS', 'T_HBSS_ORGTEAMHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ENTITYTYPE_L', 'T_HBSS_ENTITYTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_RELATEPANELSET_L', 'T_HBSS_RELATEPANELSET_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ENTITYTYPE', 'T_HBSS_ENTITYTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_RELATEPANELSET', 'T_HBSS_RELATEPANELSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_RELATEPANELSET_ET') CREATE INDEX IDX_HBSS_RELATEPANELSET_ET ON T_HBSS_RELATEPANELSET ( FENTITYTYPEID );


 EXEC P_ALTERPK 'PK_HBSS_GROUPPERSONHIS_H', 'T_HBSS_GROUPPERSONHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_GROUPPERSONHIS_H') CREATE INDEX IDX_HBSS_GROUPPERSONHIS_H ON T_HBSS_GROUPPERSONHIS_H ( FBRED );


 EXEC P_ALTERPK 'PK_HBSS_ORGRELOPEVENT_L', 'T_HBSS_ORGRELOPEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKGROUP_L', 'T_HBSS_WORKGROUP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKGROUPHIS_H', 'T_HBSS_WORKGROUPHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_WORKGROUPHIS_H') CREATE INDEX IDX_HBSS_WORKGROUPHIS_H ON T_HBSS_WORKGROUPHIS_H ( FBRED );


 EXEC P_ALTERPK 'PK_HBSS_WORKGROUPHIS_L', 'T_HBSS_WORKGROUPHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGRELOPEVENT', 'T_HBSS_ORGRELOPEVENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGRELOPEVENT') CREATE INDEX IDX_HBSS_ORGRELOPEVENT ON T_HBSS_ORGRELOPEVENT ( FCREATETIME );


 EXEC P_ALTERPK 'PK_HBSS_GROUPPERSON_L', 'T_HBSS_GROUPPERSON_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_GROUPPERSONHIS_L', 'T_HBSS_GROUPPERSONHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_GROUPPERSON', 'T_HBSS_GROUPPERSON', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_GROUPPERSON') CREATE INDEX IDX_HBSS_GROUPPERSON ON T_HBSS_GROUPPERSON ( FWORKGROUP );


 EXEC P_ALTERPK 'PK_HBSS_GROUPPERSONHIS', 'T_HBSS_GROUPPERSONHIS', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_GROUPPERSONHIS') CREATE INDEX IDX_HBSS_GROUPPERSONHIS ON T_HBSS_GROUPPERSONHIS ( FWORKGROUP );


 EXEC P_ALTERPK 'PK_HBSS_WORKGROUP', 'T_HBSS_WORKGROUP', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKGROUPHIS', 'T_HBSS_WORKGROUPHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_COSTCENTER_L', 'T_HBSS_COSTCENTER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_COSTCENTER', 'T_HBSS_COSTCENTER', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_STRATEGY_L', 'T_HBSS_STRATEGY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGY_HIS_L', 'T_HBSS_EMPSTRATEGY_HIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGY_L', 'T_HBSS_EMPSTRATEGY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGY_HIS_L', 'T_HBSS_ORGSTRATEGY_HIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGY_L', 'T_HBSS_ORGSTRATEGY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRENTRY', 'T_HBSS_EMPSTRENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EMPSTRENTRY_ORG') CREATE INDEX IDX_HBSS_EMPSTRENTRY_ORG ON T_HBSS_EMPSTRENTRY ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRENTRY', 'T_HBSS_ORGSTRENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGSTRENTRY_ORG') CREATE INDEX IDX_HBSS_ORGSTRENTRY_ORG ON T_HBSS_ORGSTRENTRY ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRENTRY_HIS', 'T_HBSS_EMPSTRENTRY_HIS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EMPSTRENTRY_HIS') CREATE INDEX IDX_HBSS_EMPSTRENTRY_HIS ON T_HBSS_EMPSTRENTRY_HIS ( FVID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EMPSTRENTRY_HIS_ORG') CREATE INDEX IDX_HBSS_EMPSTRENTRY_HIS_ORG ON T_HBSS_EMPSTRENTRY_HIS ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRENTRY_HIS', 'T_HBSS_ORGSTRENTRY_HIS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGSTRENTRY_HIS') CREATE INDEX IDX_HBSS_ORGSTRENTRY_HIS ON T_HBSS_ORGSTRENTRY_HIS ( FVID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGSTRENTRY_HIS_ORG') CREATE INDEX IDX_HBSS_ORGSTRENTRY_HIS_ORG ON T_HBSS_ORGSTRENTRY_HIS ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HBSS_STRATEGY', 'T_HBSS_STRATEGY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGYEVENT_L', 'T_HBSS_EMPSTRATEGYEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGYHIS_H', 'T_HBSS_EMPSTRATEGYHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EMPSTRATEGYHIS_H') CREATE INDEX IDX_HBSS_EMPSTRATEGYHIS_H ON T_HBSS_EMPSTRATEGYHIS_H ( FCEID );


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGYHIS_L', 'T_HBSS_EMPSTRATEGYHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRENTRYHIS', 'T_HBSS_EMPSTRENTRYHIS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EMPSTRENTRYHIS') CREATE INDEX IDX_HBSS_EMPSTRENTRYHIS ON T_HBSS_EMPSTRENTRYHIS ( FVID );


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGYEVENT_L', 'T_HBSS_ORGSTRATEGYEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGYHIS_H', 'T_HBSS_ORGSTRATEGYHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGSTRHIS_ORG_H') CREATE INDEX IDX_HBSS_ORGSTRHIS_ORG_H ON T_HBSS_ORGSTRATEGYHIS_H ( FCEID );


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGYHIS_L', 'T_HBSS_ORGSTRATEGYHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRENTRYHIS', 'T_HBSS_ORGSTRENTRYHIS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGSTRENTRYHIS') CREATE INDEX IDX_HBSS_ORGSTRENTRYHIS ON T_HBSS_ORGSTRENTRYHIS ( FVID );


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGY', 'T_HBSS_EMPSTRATEGY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EMPSTRATEGY_ADMORG') CREATE INDEX IDX_HBSS_EMPSTRATEGY_ADMORG ON T_HBSS_EMPSTRATEGY ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGY', 'T_HBSS_ORGSTRATEGY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGSTRATEGY_ADMORG') CREATE INDEX IDX_HBSS_ORGSTRATEGY_ADMORG ON T_HBSS_ORGSTRATEGY ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGY_HIS', 'T_HBSS_EMPSTRATEGY_HIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGY_HIS', 'T_HBSS_ORGSTRATEGY_HIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGYEVENT', 'T_HBSS_EMPSTRATEGYEVENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EMPSTRATEGYEVENT') CREATE INDEX IDX_HBSS_EMPSTRATEGYEVENT ON T_HBSS_EMPSTRATEGYEVENT ( FSOURCEAPP );


 EXEC P_ALTERPK 'PK_HBSS_EMPSTRATEGYHIS', 'T_HBSS_EMPSTRATEGYHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGYEVENT', 'T_HBSS_ORGSTRATEGYEVENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGSTRATEGYEVENT') CREATE INDEX IDX_HBSS_ORGSTRATEGYEVENT ON T_HBSS_ORGSTRATEGYEVENT ( FSOURCEAPP );


 EXEC P_ALTERPK 'PK_HBSS_ORGSTRATEGYHIS', 'T_HBSS_ORGSTRATEGYHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLETEMP_L', 'T_HBSS_WORKROLETEMP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLES_L', 'T_HBSS_WORKROLES_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ROLETYPE_L', 'T_HBSS_ROLETYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PERSONROLEREL', 'T_HBSS_PERSONROLEREL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_PERSONROLEREL_ROLE') CREATE INDEX IDX_HBSS_PERSONROLEREL_ROLE ON T_HBSS_PERSONROLEREL ( FROLEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_PERSONROLEREL_PERSON') CREATE INDEX IDX_HBSS_PERSONROLEREL_PERSON ON T_HBSS_PERSONROLEREL ( FPERSONID ,FROLEID ,FISEFFECTIVE );


 EXEC P_ALTERPK 'PK_HBSS_PERSONROLERELHIS', 'T_HBSS_PERSONROLERELHIS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_PERSONROLERELHIS_ROLE') CREATE INDEX IDX_HBSS_PERSONROLERELHIS_ROLE ON T_HBSS_PERSONROLERELHIS ( FROLEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_PERSONROLERELHIS_PER') CREATE INDEX IDX_HBSS_PERSONROLERELHIS_PER ON T_HBSS_PERSONROLERELHIS ( FPERSONID ,FROLEID ,FISEFFECTIVE );


 EXEC P_ALTERPK 'PK_HBSS_ROLESOURCETYPE_L', 'T_HBSS_ROLESOURCETYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLESHIS_L', 'T_HBSS_WORKROLESHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLESHIS_H', 'T_HBSS_WORKROLESHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_WORKROLESHIS_H') CREATE INDEX IDX_HBSS_WORKROLESHIS_H ON T_HBSS_WORKROLESHIS_H ( FCEID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELBIEVENT_L', 'T_HBSS_REPORTRELBIEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELHIS_H', 'T_HBSS_REPORTRELHIS_H', 'FVID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_REPORTRELHIS_H') CREATE INDEX IDX_HBSS_REPORTRELHIS_H ON T_HBSS_REPORTRELHIS_H ( FCEID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELHIS_L', 'T_HBSS_REPORTRELHIS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELOPEVENT_L', 'T_HBSS_REPORTRELOPEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REPORTINGRELATION_L', 'T_HBSS_REPORTINGRELATION_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ROLETYPE', 'T_HBSS_ROLETYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLETEMP', 'T_HBSS_WORKROLETEMP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_WORKROLETEMP_ROLETYPE') CREATE INDEX IDX_HBSS_WORKROLETEMP_ROLETYPE ON T_HBSS_WORKROLETEMP ( FROLETYPEID );


 EXEC P_ALTERPK 'PK_HBSS_ROLESOURCETYPE', 'T_HBSS_ROLESOURCETYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLES', 'T_HBSS_WORKROLES', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_WORKROLES_ADMINORG') CREATE INDEX IDX_HBSS_WORKROLES_ADMINORG ON T_HBSS_WORKROLES ( FADMINORGID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELBIEVENT', 'T_HBSS_REPORTRELBIEVENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_REPORTRELBIEVENT') CREATE INDEX IDX_HBSS_REPORTRELBIEVENT ON T_HBSS_REPORTRELBIEVENT ( FSOURCEBILLID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELOPEVENT', 'T_HBSS_REPORTRELOPEVENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_REPORTRELOPEVENT') CREATE INDEX IDX_HBSS_REPORTRELOPEVENT ON T_HBSS_REPORTRELOPEVENT ( FSOURCEBOID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTINGRELATION', 'T_HBSS_REPORTINGRELATION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_REPORTINGRELATION') CREATE INDEX IDX_HBSS_REPORTINGRELATION ON T_HBSS_REPORTINGRELATION ( FROLEID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELHIS', 'T_HBSS_REPORTRELHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLESHIS', 'T_HBSS_WORKROLESHIS', 'FVID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLESREFRED', 'T_HBSS_WORKROLESREFRED', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_WORKROLESREFRED') CREATE INDEX IDX_HBSS_WORKROLESREFRED ON T_HBSS_WORKROLESREFRED ( FNEWROLEID );


 EXEC P_ALTERPK 'PK_HBSS_WORKROLESREFRED_L', 'T_HBSS_WORKROLESREFRED_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELRED', 'T_HBSS_REPORTRELRED', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_REPORTRELRED') CREATE INDEX IDX_HBSS_REPORTRELRED ON T_HBSS_REPORTRELRED ( FRELATIONID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELRED_L', 'T_HBSS_REPORTRELRED_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELREFRED', 'T_HBSS_REPORTRELREFRED', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_REPORTRELREFRED') CREATE INDEX IDX_HBSS_REPORTRELREFRED ON T_HBSS_REPORTRELREFRED ( FNEWRELATIONID );


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELREFRED_L', 'T_HBSS_REPORTRELREFRED_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLES_OPEVENT_L', 'T_HBSS_WORKROLES_OPEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKROLES_OPEVENT', 'T_HBSS_WORKROLES_OPEVENT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_WORKROLES_OPEVENT') CREATE INDEX IDX_HBSS_WORKROLES_OPEVENT ON T_HBSS_WORKROLES_OPEVENT ( FSOURCEBOID );

 EXEC P_ALTERPK 'PK_HBSS_PARTYA_L', 'T_HBSS_PARTYA_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_NATIONALITY_L', 'T_HBSS_NATIONALITY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ONBOARDTYPE_L', 'T_HBSS_ONBOARDTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_FLOK_L', 'T_HBSS_FLOK_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMERGENCYREL_L', 'T_HBSS_EMERGENCYREL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKEXP_L', 'T_HBSS_WORKEXP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BANKDEPOSIT_L', 'T_HBSS_BANKDEPOSIT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BANKPURPOSE_L', 'T_HBSS_BANKPURPOSE_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_QUITPERSONTAG_L', 'T_HBSS_QUITPERSONTAG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITMAINTYPE_L', 'T_HBSS_QUITMAINTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITSUBTYPE_L', 'T_HBSS_QUITSUBTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITTYPE_L', 'T_HBSS_QUITTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITLINK_L', 'T_HBSS_QUITLINK_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_CATEGORY_L', 'T_HBSS_CATEGORY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BASEDATALIST_L', 'T_HBSS_BASEDATALIST_L', 'FPKID', '1';

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



 EXEC P_ALTERPK 'PK_HBSS_DEGREE_L', 'T_HBSS_DEGREE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPGROUP_L', 'T_HBSS_EMPGROUP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ENTERPRISE_L', 'T_HBSS_ENTERPRISE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_FAMILIARITY_L', 'T_HBSS_FAMILIARITY_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_MARRIAGESTATUS_L', 'T_HBSS_MARRIAGESTATUS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OCPQUAL_L', 'T_HBSS_OCPQUAL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OPERATIONQUAL_L', 'T_HBSS_OPERATIONQUAL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PARTY_L', 'T_HBSS_PARTY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_POLITICALSTATUS_L', 'T_HBSS_POLITICALSTATUS_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_POSTYPE_L', 'T_HBSS_POSTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROCREATSTATUS_L', 'T_HBSS_PROCREATSTATUS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROJECTTYPE_L', 'T_HBSS_PROJECTTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROTITLE_L', 'T_HBSS_PROTITLE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROTITLELEVEL_L', 'T_HBSS_PROTITLELEVEL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITREASON_L', 'T_HBSS_QUITREASON_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_RELIGION_L', 'T_HBSS_RELIGION_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SCHOOLTYPE_L', 'T_HBSS_SCHOOLTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TALENTTAG_L', 'T_HBSS_TALENTTAG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TIMELIMITTYPE_L', 'T_HBSS_TIMELIMITTYPE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_TIMELIMITTYPE_L') CREATE INDEX IDX_HBSS_TIMELIMITTYPE_L ON T_HBSS_TIMELIMITTYPE_L ( FID ,FLOCALEID );
 
 EXEC P_ALTERPK 'PK_HBSS_CREDENTIALSTYPE_L', 'T_HBSS_CREDENTIALSTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HEALTHSTATUS_L', 'T_HBSS_HEALTHSTATUS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OCPQUALLEVEL_L', 'T_HBSS_OCPQUALLEVEL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ONBOARDSOURCE_L', 'T_HBSS_ONBOARDSOURCE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REWPNMLEVEL_L', 'T_HBSS_REWPNMLEVEL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REWPNMTYPE_L', 'T_HBSS_REWPNMTYPE_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_CONSTELLATION_L', 'T_HBSS_CONSTELLATION_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_INDUSTRYTYPE_L', 'T_HBSS_INDUSTRYTYPE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_INDUSTRYTYPE_L') CREATE INDEX IDX_HBSS_INDUSTRYTYPE_L ON T_HBSS_INDUSTRYTYPE_L ( FID ,FLOCALEID );
 
 EXEC P_ALTERPK 'PK_HBSS_OUTSIDEPRAISE_L', 'T_HBSS_OUTSIDEPRAISE_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_TRAINMODE_L', 'T_HBSS_TRAINMODE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TRAINTYPE_L', 'T_HBSS_TRAINTYPE_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_EMPNATURE_L', 'T_HBSS_EMPNATURE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGANIZER_L', 'T_HBSS_ORGANIZER_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_ZODIAC_L', 'T_HBSS_ZODIAC_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIPLOMA_L', 'T_HBSS_DIPLOMA_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_LABORRELTYPECLS_L', 'T_HBSS_LABORRELTYPECLS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABRELSTATUSPRD_L', 'T_HBSS_LABRELSTATUSPRD_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABORRELSTATUS_L', 'T_HBSS_LABORRELSTATUS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABRELSTATUSCLS_L', 'T_HBSS_LABRELSTATUSCLS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABORRELTYPE_L', 'T_HBSS_LABORRELTYPE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_LABORRELTYPE_L') CREATE INDEX IDX_HBSS_LABORRELTYPE_L ON T_HBSS_LABORRELTYPE_L ( FID ,FLOCALEID );
 EXEC P_ALTERPK 'PK_HBSS_DIPLOMATYPE_L', 'T_HBSS_DIPLOMATYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROTITLETYPE_L', 'T_HBSS_PROTITLETYPE_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_REPORTRELTYPE_L', 'T_HBSS_REPORTRELTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BUSSINESSFIELD_L', 'T_HBSS_BUSSINESSFIELD_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_INTERNSHIPTYPE_L', 'T_HBSS_INTERNSHIPTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PERQUITTYPE_L', 'T_HBSS_PERQUITTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_COLLEGE_L', 'T_HBSS_COLLEGE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_COLLEGCATEG', 'T_HBSS_COLLEGCATEG', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_COLLEGCATEG') CREATE INDEX IDX_HBSS_COLLEGCATEG ON T_HBSS_COLLEGCATEG ( FID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_HBSS_SUPPLIER_L', 'T_HBSS_SUPPLIER_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SUPPLIERLEVEL_L', 'T_HBSS_SUPPLIERLEVEL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SUPPLLINKMAN_L', 'T_HBSS_SUPPLLINKMAN_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_SUPPLLINKMAN_L') CREATE INDEX IDX_HBSS_SUPPLLINKMAN_L ON T_HBSS_SUPPLLINKMAN_L ( FLINKMANID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_HBSS_SUPSERTYPE_L', 'T_HBSS_SUPSERTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SUPSERVISCOPE', 'T_HBSS_SUPSERVISCOPE', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_SUPSERVISCOPE') CREATE INDEX IDX_HBSS_SUPSERVISCOPE ON T_HBSS_SUPSERVISCOPE ( FID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_HBSS_POSTSTATE_L', 'T_HBSS_POSTSTATE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_POSTSTATE_ENTRY', 'T_HBSS_POSTSTATE_ENTRY', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_POSTSTATE_ENTRY') CREATE INDEX IDX_HBSS_POSTSTATE_ENTRY ON T_HBSS_POSTSTATE_ENTRY ( FID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_HBSS_POSTCATEGORY_L', 'T_HBSS_POSTCATEGORY_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_BUSSINESSOBJECT_L', 'T_HBSS_BUSSINESSOBJECT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGTYPE_L', 'T_HBSS_ORGTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TEAMTYPE_L', 'T_HBSS_TEAMTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BUSSINESSTYPE_L', 'T_HBSS_BUSSINESSTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_NUMBERPREFIX_L', 'T_HBSS_NUMBERPREFIX_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DEPCYTYPE_L', 'T_HBSS_DEPCYTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_NATIONALITY', 'T_HBSS_NATIONALITY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_FLOK', 'T_HBSS_FLOK', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_WORKEXP', 'T_HBSS_WORKEXP', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ONBOARDTYPE', 'T_HBSS_ONBOARDTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITPERSONTAG', 'T_HBSS_QUITPERSONTAG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITMAINTYPE', 'T_HBSS_QUITMAINTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITLINK', 'T_HBSS_QUITLINK', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITSUBTYPE', 'T_HBSS_QUITSUBTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITTYPE', 'T_HBSS_QUITTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_CATEGORY', 'T_HBSS_CATEGORY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BASEDATALIST', 'T_HBSS_BASEDATALIST', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMERGENCYREL', 'T_HBSS_EMERGENCYREL', 'FID', '1';

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



 EXEC P_ALTERPK 'PK_HBSS_DEGREE', 'T_HBSS_DEGREE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_FAMILIARITY', 'T_HBSS_FAMILIARITY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_HEALTHSTATUS', 'T_HBSS_HEALTHSTATUS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_MARRIAGESTATUS', 'T_HBSS_MARRIAGESTATUS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OCPQUAL', 'T_HBSS_OCPQUAL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OCPQUALLEVEL', 'T_HBSS_OCPQUALLEVEL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OPERATIONQUAL', 'T_HBSS_OPERATIONQUAL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PARTY', 'T_HBSS_PARTY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_POLITICALSTATUS', 'T_HBSS_POLITICALSTATUS', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_PROCREATSTATUS', 'T_HBSS_PROCREATSTATUS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROTITLELEVEL', 'T_HBSS_PROTITLELEVEL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_RELIGION', 'T_HBSS_RELIGION', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SCHOOLTYPE', 'T_HBSS_SCHOOLTYPE', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_INDUSTRYTYPE', 'T_HBSS_INDUSTRYTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_CONSTELLATION', 'T_HBSS_CONSTELLATION', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_DIPLOMA', 'T_HBSS_DIPLOMA', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TRAINMODE', 'T_HBSS_TRAINMODE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TRAINTYPE', 'T_HBSS_TRAINTYPE', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_ORGANIZER', 'T_HBSS_ORGANIZER', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_EMPNATURE', 'T_HBSS_EMPNATURE', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_ZODIAC', 'T_HBSS_ZODIAC', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_CREDENTIALSTYPE', 'T_HBSS_CREDENTIALSTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BANKDEPOSIT', 'T_HBSS_BANKDEPOSIT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BANKPURPOSE', 'T_HBSS_BANKPURPOSE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ENTERPRISE', 'T_HBSS_ENTERPRISE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ONBOARDSOURCE', 'T_HBSS_ONBOARDSOURCE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROJECTTYPE', 'T_HBSS_PROJECTTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REWPNMLEVEL', 'T_HBSS_REWPNMLEVEL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TALENTTAG', 'T_HBSS_TALENTTAG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TIMELIMITTYPE', 'T_HBSS_TIMELIMITTYPE', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_OUTSIDEPRAISE', 'T_HBSS_OUTSIDEPRAISE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_QUITREASON', 'T_HBSS_QUITREASON', 'FID', '1';

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



 EXEC P_ALTERPK 'PK_HBSS_REWPNMTYPE', 'T_HBSS_REWPNMTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DIPLOMATYPE', 'T_HBSS_DIPLOMATYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROTITLETYPE', 'T_HBSS_PROTITLETYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PROTITLE', 'T_HBSS_PROTITLE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_EMPGROUP', 'T_HBSS_EMPGROUP', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_INTERNSHIPTYPE', 'T_HBSS_INTERNSHIPTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_COLLEGE', 'T_HBSS_COLLEGE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SUPPLIERLEVEL', 'T_HBSS_SUPPLIERLEVEL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SUPPLLINKMAN', 'T_HBSS_SUPPLLINKMAN', 'FLINKMANID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SUPSERTYPE', 'T_HBSS_SUPSERTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_SUPPLIER', 'T_HBSS_SUPPLIER', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PARTYA', 'T_HBSS_PARTYA', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_PERQUITTYPE', 'T_HBSS_PERQUITTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_POSTCATEGORY', 'T_HBSS_POSTCATEGORY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_POSTSTATE', 'T_HBSS_POSTSTATE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_POSTYPE', 'T_HBSS_POSTYPE', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_HBSS_ORGTYPE', 'T_HBSS_ORGTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TEAMTYPE', 'T_HBSS_TEAMTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BUSSINESSOBJECT', 'T_HBSS_BUSSINESSOBJECT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BUSSINESSTYPE', 'T_HBSS_BUSSINESSTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_NUMBERPREFIX', 'T_HBSS_NUMBERPREFIX', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_DEPCYTYPE', 'T_HBSS_DEPCYTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_BUSSINESSFIELD', 'T_HBSS_BUSSINESSFIELD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_REPORTRELTYPE', 'T_HBSS_REPORTRELTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABORRELTYPECLS', 'T_HBSS_LABORRELTYPECLS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABRELSTATUSPRD', 'T_HBSS_LABRELSTATUSPRD', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABORRELSTATUS', 'T_HBSS_LABORRELSTATUS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABRELSTATUSCLS', 'T_HBSS_LABRELSTATUSCLS', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_LABORRELTYPE', 'T_HBSS_LABORRELTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OTCLASSIFY', 'T_HBSS_OTCLASSIFY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_OTCLASSIFY_L', 'T_HBSS_OTCLASSIFY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ORGTEAMTYPE', 'T_HBSS_ORGTEAMTYPE', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ORGTEAMTYPE') CREATE INDEX IDX_HBSS_ORGTEAMTYPE ON T_HBSS_ORGTEAMTYPE ( FBASEDATAID );


 EXEC P_ALTERPK 'PK_HBSS_TEAMCOOPRELTYPE_L', 'T_HBSS_TEAMCOOPRELTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TEAMCOOPRELTYPE', 'T_HBSS_TEAMCOOPRELTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TAXUNIT_L', 'T_HBSS_TAXUNIT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TAXUNITENTRY', 'T_HBSS_TAXUNITENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_TAXUNIT', 'T_HBSS_TAXUNIT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HBSS_ENTITYRELEASEINFO', 'T_HBSS_ENTITYRELEASEINFO', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EES_FQUERYENTITYNAME') CREATE INDEX IDX_HBSS_EES_FQUERYENTITYNAME ON T_HBSS_ENTITYRELEASEINFO ( FQUERYENTITYNAME );


 EXEC P_ALTERPK 'PK_HBSS_ENTITYSYNCCONFIG', 'T_HBSS_ENTITYSYNCCONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_ESC_FENTITY') CREATE INDEX IDX_HBSS_ESC_FENTITY ON T_HBSS_ENTITYSYNCCONFIG ( FENTITY );


 EXEC P_ALTERPK 'PK_HBSS_ENTITYESCONFIG', 'T_HBSS_ENTITYESCONFIG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HBSS_EEC_FQUERYENTITYNAME') CREATE INDEX IDX_HBSS_EEC_FQUERYENTITYNAME ON T_HBSS_ENTITYESCONFIG ( FQUERYENTITYNAME );


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\HBSS_constraint.sql **/
