You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Why query to extract expenditure based on creation_date takes too long?

Received Response


SQL query

Content (required):


I need an SQL query to extract expenditures of a certain type, that were not reversed and that have the creation_date into a given interval.

I created the below query, that works fine without the last condition (marked in bold, at the end of query). But I need to restrict based on the expenditure creation_date....any idea how this can be achieved in an efficient way?

SELECT  ROUND((pex.RAW_COST_RATE * pex.quantity),2) daily_allowance_amt

       , pex.incurred_by_person_id person_id

                             , pex.expenditure_item_date

                             , pex.creation_date

                             , pex.expenditure_item_id

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!