IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PB_FPAYDATE') CREATE INDEX IDX_CAS_PB_FPAYDATE ON T_CAS_PAYMENTBILL ( FPAYDATE );

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_AGENTPAYTIME') CREATE INDEX IDX_CAS_AGENTPAYTIME ON T_CAS_AGENTPAYBILLENTRY_E ( FEPAYTIME );

