IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_CAS_TRANSFERAPPLYBILL_FAPPLYDATE') CREATE INDEX IDX_T_CAS_TRANSFERAPPLYBILL_FAPPLYDATE ON T_CAS_TRANSFERAPPLYBILL ( FAPPLYDATE ,FAPPLYORGID ,FPAIDSTATUS );