 EXEC P_ALTERPK 'PK_T_ER_DAILYREIMPAYENTRY', 'T_ER_DAILYREIMPAYENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_DRPE_TARGETBILLID_NO') CREATE INDEX IDX_ER_DRPE_TARGETBILLID_NO ON T_ER_DAILYREIMPAYENTRY ( FTARGETBILLID ,FTARGETBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_DRPE_FEQ') CREATE INDEX IDX_ER_DRPE_FEQ ON T_ER_DAILYREIMPAYENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_ER_LOANBILLPAYENTRY', 'T_ER_LOANBILLPAYENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_LBPE_TARGETBILLID_NO') CREATE INDEX IDX_ER_LBPE_TARGETBILLID_NO ON T_ER_LOANBILLPAYENTRY ( FTARGETBILLID ,FTARGETBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_LBPE_FEQ') CREATE INDEX IDX_ER_LBPE_FEQ ON T_ER_LOANBILLPAYENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_ER_PUBLICREIMPAYENTRY', 'T_ER_PUBLICREIMPAYENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_PRPE_TARGETBILLID_NO') CREATE INDEX IDX_ER_PRPE_TARGETBILLID_NO ON T_ER_PUBLICREIMPAYENTRY ( FTARGETBILLID ,FTARGETBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_PRPE_FEQ') CREATE INDEX IDX_ER_PRPE_FEQ ON T_ER_PUBLICREIMPAYENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_ER_TRIPREIMPAYENTRY', 'T_ER_TRIPREIMPAYENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_TRPE_TARGETBILLID_NO') CREATE INDEX IDX_ER_TRPE_TARGETBILLID_NO ON T_ER_TRIPREIMPAYENTRY ( FTARGETBILLID ,FTARGETBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_TRPE_FEQ') CREATE INDEX IDX_ER_TRPE_FEQ ON T_ER_TRIPREIMPAYENTRY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_T_ER_TRIPREQPAYENTRY', 'T_ER_TRIPREQPAYENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_TQPE_TARGETBILLID_NO') CREATE INDEX IDX_ER_TQPE_TARGETBILLID_NO ON T_ER_TRIPREQPAYENTRY ( FTARGETBILLID ,FTARGETBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_TQPE_FEQ') CREATE INDEX IDX_ER_TQPE_FEQ ON T_ER_TRIPREQPAYENTRY ( FID ,FSEQ );
