EXEC p_DropIdx 'IDX_CAS_PB_FSOURCEBILLTYPE', 'T_CAS_PAYMENTBILL';
EXEC p_DropIdx 'IDX_CAS_PB_FCURRENCYID', 'T_CAS_PAYMENTBILL';
EXEC p_DropIdx 'IDX_CAS_PB_FPAYERACCTBANKID', 'T_CAS_PAYMENTBILL';
EXEC p_DropIdx 'IDX_CAS_PB_FBILLTYPEID', 'T_CAS_PAYMENTBILL';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PB_FPAYERACCTBANKID') CREATE INDEX IDX_CAS_PB_FPAYERACCTBANKID ON T_CAS_PAYMENTBILL ( FPAYERACCTBANKID,FCURRENCYID );

EXEC p_DropIdx 'IDX_CAS_RECE_STATUSORGID', 'T_CAS_RECEIVINGBILL';
EXEC p_DropIdx 'IDX_CAS_RECE_DATEORG', 'T_CAS_RECEIVINGBILL';
EXEC p_DropIdx 'IDX_CAS_RECE_DSO', 'T_CAS_RECEIVINGBILL';
EXEC p_DropIdx 'IDX_CAS_RECE_FCURRENCYID', 'T_CAS_RECEIVINGBILL';

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECE_FBIZDATE') CREATE INDEX IDX_CAS_RECE_FBIZDATE ON T_CAS_RECEIVINGBILL ( FBIZDATE, FORGID,FBILLSTATUS );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_RECE_FPAYEEACCTBANKID') CREATE INDEX IDX_CAS_RECE_FPAYEEACCTBANKID ON T_CAS_RECEIVINGBILL ( FPAYEEACCTBANKID,FCURRENCYID );


