 EXEC P_ALTERPK 'PK_HDM_ENCOURAGETITLE', 'T_HDM_ENCOURAGETITLE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_ENCOURAGETITLE_L', 'T_HDM_ENCOURAGETITLE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGASKDETAILS', 'T_HDM_REGASKDETAILS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGASKDETAILS') CREATE INDEX IDX_HDM_REGASKDETAILS ON T_HDM_REGASKDETAILS ( FBEMPLOYEEID ,FPERSONID );


 EXEC P_ALTERPK 'PK_HDM_REGASKDETAILS_L', 'T_HDM_REGASKDETAILS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGASKRESULT', 'T_HDM_REGASKRESULT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGASKRESULT') CREATE INDEX IDX_HDM_REGASKRESULT ON T_HDM_REGASKRESULT ( FBEMPLOYEEID ,FPERSONID );


 EXEC P_ALTERPK 'PK_HDM_REGASKRESULT_L', 'T_HDM_REGASKRESULT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGBILLEVENT', 'T_HDM_REGBILLEVENT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGBILLEVENT_L', 'T_HDM_REGBILLEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGCATEGORY', 'T_HDM_REGCATEGORY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGCATEGORY_L', 'T_HDM_REGCATEGORY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGCOMMENT', 'T_HDM_REGCOMMENT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGCOMMENT_L', 'T_HDM_REGCOMMENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMDETAILS', 'T_HDM_REGEXAMDETAILS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGEXAMDETAILS') CREATE INDEX IDX_HDM_REGEXAMDETAILS ON T_HDM_REGEXAMDETAILS ( FBEMPLOYEEID ,FPERSONID );


 EXEC P_ALTERPK 'PK_HDM_REGEXAMDETAILS_L', 'T_HDM_REGEXAMDETAILS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMITEM', 'T_HDM_REGEXAMITEM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMITEM_L', 'T_HDM_REGEXAMITEM_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMITEMEXC', 'T_HDM_REGEXAMITEMEXC', 'FDATAID,FUSEORGID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGEXAMITEMEXC_U') CREATE INDEX IDX_HDM_REGEXAMITEMEXC_U ON T_HDM_REGEXAMITEMEXC ( FUSEORGID );


 EXEC P_ALTERPK 'PK_HDM_REGEXAMITEMUSEREG', 'T_HDM_REGEXAMITEMUSEREG', 'FUSEORGID,FDATAID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGEXAMITEMUSEREG') CREATE INDEX IDX_HDM_REGEXAMITEMUSEREG ON T_HDM_REGEXAMITEMUSEREG ( FCREATEORGID );


 EXEC P_ALTERPK 'PK_HDM_REGEXAMRESULT', 'T_HDM_REGEXAMRESULT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGEXAMRESULT') CREATE INDEX IDX_HDM_REGEXAMRESULT ON T_HDM_REGEXAMRESULT ( FBEMPLOYEEID ,FPERSONID );


 EXEC P_ALTERPK 'PK_HDM_REGEXAMRESULT_L', 'T_HDM_REGEXAMRESULT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMSCORE', 'T_HDM_REGEXAMSCORE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMTPLREL', 'T_HDM_REGEXAMTPLREL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMTYPE', 'T_HDM_REGEXAMTYPE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMTYPE_L', 'T_HDM_REGEXAMTYPE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGEXAMTYPEEXC', 'T_HDM_REGEXAMTYPEEXC', 'FDATAID,FUSEORGID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGEXAMTYPEEXC_U') CREATE INDEX IDX_HDM_REGEXAMTYPEEXC_U ON T_HDM_REGEXAMTYPEEXC ( FUSEORGID );


 EXEC P_ALTERPK 'PK_HDM_REGEXAMTYPEUSEREG', 'T_HDM_REGEXAMTYPEUSEREG', 'FUSEORGID,FDATAID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGEXAMTYPEUSEREG') CREATE INDEX IDX_HDM_REGEXAMTYPEUSEREG ON T_HDM_REGEXAMTYPEUSEREG ( FCREATEORGID );


 EXEC P_ALTERPK 'PK_HDM_REGKEYEVENT', 'T_HDM_REGKEYEVENT', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGKEYEVENT_L', 'T_HDM_REGKEYEVENT_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGLARRESULTFIX', 'T_HDM_REGLARRESULTFIX', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGLARRESULTFIX_L', 'T_HDM_REGLARRESULTFIX_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGPROCESS', 'T_HDM_REGPROCESS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGPROCESS') CREATE INDEX IDX_HDM_REGPROCESS ON T_HDM_REGPROCESS ( FBEMPLOYEEID ,FPERSONID );


 EXEC P_ALTERPK 'PK_HDM_REGPROCESS_L', 'T_HDM_REGPROCESS_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGRESULTREVISE', 'T_HDM_REGRESULTREVISE', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGRESULTREVISE_L', 'T_HDM_REGRESULTREVISE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGTESTMODEL', 'T_HDM_REGTESTMODEL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGTESTMODEL_L', 'T_HDM_REGTESTMODEL_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGTESTMODELEXC', 'T_HDM_REGTESTMODELEXC', 'FDATAID,FUSEORGID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGTESTMODELEXC_U') CREATE INDEX IDX_HDM_REGTESTMODELEXC_U ON T_HDM_REGTESTMODELEXC ( FUSEORGID );


 EXEC P_ALTERPK 'PK_HDM_REGTESTMODELUSEREG', 'T_HDM_REGTESTMODELUSEREG', 'FUSEORGID,FDATAID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGTESTMODELUSEREG') CREATE INDEX IDX_HDM_REGTESTMODELUSEREG ON T_HDM_REGTESTMODELUSEREG ( FCREATEORGID );


 EXEC P_ALTERPK 'PK_HDM_REGTRACE', 'T_HDM_REGTRACE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HDM_REGTRACE') CREATE INDEX IDX_HDM_REGTRACE ON T_HDM_REGTRACE ( FBEMPLOYEEID ,FTRACEID ,FPERSONID );


 EXEC P_ALTERPK 'PK_HDM_REGTRACE_L', 'T_HDM_REGTRACE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGWARNCONFIG', 'T_HDM_REGWARNCONFIG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_HDM_REGWARNCONFIG_L', 'T_HDM_REGWARNCONFIG_L', 'FPKID', '1';

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