IF EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PB_DSO') DROP INDEX T_CAS_PAYMENTBILL.IDX_CAS_PB_DSO;
IF EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PB_DATEORG') DROP INDEX T_CAS_PAYMENTBILL.IDX_CAS_PB_DATEORG;

IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PB_DOS') CREATE INDEX IDX_CAS_PB_DOS ON T_CAS_PAYMENTBILL ( FBIZDATE ,FORGID,FBILLSTATUS );
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CAS_PB_OBD') CREATE INDEX IDX_CAS_PB_OBD ON T_CAS_PAYMENTBILL ( FORGID ,FBILLTYPEID,FBIZDATE );
