 EXEC P_ALTERPK 'PK_T_EB_TEMPLATEORG', 'T_EB_TEMPLATEORG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_TEMPLATEORG_P1') CREATE INDEX IDX_EB_TEMPLATEORG_P1 ON T_EB_TEMPLATEORG ( FSCHEMEID );

  EXEC P_ALTERPK 'PK_T_EB_RPTSCHEME', 'T_EB_RPTSCHEME', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_SCHEME_P1') CREATE INDEX IDX_EB_SCHEME_P1 ON T_EB_RPTSCHEME ( FBIZRANGEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_SCHEME_P2') CREATE INDEX IDX_EB_SCHEME_P2 ON T_EB_RPTSCHEME ( FMODELID );

  EXEC P_ALTERPK 'PK_T_EB_RPTSCHEME_L', 'T_EB_RPTSCHEME_L', 'FPKID', '1';

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

  EXEC P_ALTERPK 'PK_T_EB_SCHEMEASSIGN', 'T_EB_SCHEMEASSIGN', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_SCHEMEASSIGN_P1') CREATE INDEX IDX_EB_SCHEMEASSIGN_P1 ON T_EB_SCHEMEASSIGN ( FSCHEMEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_SCHEMEASSIGN_P2') CREATE INDEX IDX_EB_SCHEMEASSIGN_P2 ON T_EB_SCHEMEASSIGN ( FBIZRANGEID );

 EXEC P_ALTERPK 'PK_T_EB_TEMPLATEUSER', 'T_EB_TEMPLATEUSER', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_TEMPLATEUSER_P1') CREATE INDEX IDX_EB_TEMPLATEUSER_P1 ON T_EB_TEMPLATEUSER ( FMODELID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_TEMPLATEUSER_P2') CREATE INDEX IDX_EB_TEMPLATEUSER_P2 ON T_EB_TEMPLATEUSER ( FTEMPLATEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_TEMPLATEUSER_P3') CREATE INDEX IDX_EB_TEMPLATEUSER_P3 ON T_EB_TEMPLATEUSER ( FUSERID );

  IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_DYNAMICREPORT_2') CREATE INDEX IX_EB_DYNAMICREPORT_2 ON T_EB_DYNAMICREPORT ( FSCHEMEASSIGNID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_REPORTATTACHMENT_P3') CREATE INDEX IDX_EB_REPORTATTACHMENT_P3 ON T_EB_REPORTATTACHMENT ( FRPTENTITYID );
 
  EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPADJENTITY', 'T_EB_CENTRALAPPADJENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CENTRALAPPADJENT_FENID') CREATE INDEX IDX_EB_CENTRALAPPADJENT_FENID ON T_EB_CENTRALAPPADJENTITY ( FID ,FENTRYID );


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPADJRECORD', 'T_EB_CENTRALAPPADJRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CENTRALAPPADJREC_FNO') CREATE INDEX IDX_EB_CENTRALAPPADJREC_FNO ON T_EB_CENTRALAPPADJRECORD ( FAPPROVEBILLNO );


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPPLAN', 'T_EB_CENTRALAPPPLAN', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPPLAN_RELAT', 'T_EB_CENTRALAPPPLAN_RELAT', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPPLAN_TYPE', 'T_EB_CENTRALAPPPLAN_TYPE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPPLANBILL', 'T_EB_CENTRALAPPPLANBILL', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPPLANENTITY', 'T_EB_CENTRALAPPPLANENTITY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPPLANREPORT', 'T_EB_CENTRALAPPPLANREPORT', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPRECENTITY', 'T_EB_CENTRALAPPRECENTITY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPRECORD', 'T_EB_CENTRALAPPRECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_CENTRALAPPREC_FBILL') CREATE INDEX IDX_EB_CENTRALAPPREC_FBILL ON T_EB_CENTRALAPPRECORD ( FAPPROVEBILLNO );


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPREL', 'T_EB_CENTRALAPPREL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPREL_USER', 'T_EB_CENTRALAPPREL_USER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_EB_CENTRALAPPTYPE', 'T_EB_CENTRALAPPTYPE', 'FID', '1';

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

  EXEC P_ALTERPK 'PK_T_EB_BGDECOMPOSE', 'T_EB_BGDECOMPOSE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_BGDECOMPOSE_FMODELID') CREATE INDEX IDX_EB_BGDECOMPOSE_FMODELID ON T_EB_BGDECOMPOSE ( FMODELID ,FBGAPPLYSCHEME );


 EXEC P_ALTERPK 'PK_EB_DECOMPOSESCHEME', 'T_EB_DECOMPOSESCHEME', 'FID', '1';

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

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


 EXEC P_ALTERPK 'PK_EB_DECOMPOSESCHEME_L', 'T_EB_DECOMPOSESCHEME_L', 'FPKID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_DECOMEL_FNAME') CREATE INDEX IDX_EB_DECOMEL_FNAME ON T_EB_DECOMPOSESCHEME_L ( FNAME );


 EXEC P_ALTERPK 'PK_EB_DECOMSCHEME_ENTRY', 'T_EB_DECOMSCHEME_ENTRY', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_DECOME_FSEQ') CREATE INDEX IDX_EB_DECOME_FSEQ ON T_EB_DECOMSCHEME_ENTRY ( FSEQ );
 
  EXEC P_ALTERPK 'PK_T_EB_ADAPTSCOPE', 'T_EB_ADAPTSCOPE', 'FENTRYID', '1';

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

  EXEC P_ALTERPK 'PK_T_EB_FIXEDVALUE', 'T_EB_FIXEDVALUE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_FIXEDVALUE_P1') CREATE INDEX IDX_EB_FIXEDVALUE_P1 ON T_EB_FIXEDVALUE ( FMODELID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_FIXEDVALUE_P2') CREATE INDEX IDX_EB_FIXEDVALUE_P2 ON T_EB_FIXEDVALUE ( FBIZMODEL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_FIXEDVALUE_P3') CREATE INDEX IDX_EB_FIXEDVALUE_P3 ON T_EB_FIXEDVALUE ( FFIXEDTYPE );

  EXEC P_ALTERPK 'PK_T_EB_FIXEDVALUESETTING', 'T_EB_FIXEDVALUESETTING', 'FENTRYID', '1';

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