Fiscal Year Query Condition
I am trying to place a condition in my query that would limit the date range on a particular date field to data from the start of my fiscal year (1st July 2006) and now.
The 'now' part is easy because I would specify something like sysdate as my upper limit but I cannot get the 1 July 2006 without hardcoding it in my query.
I am fundamentally looking at some date arithmetic and I though of using add_months or something similar but cannot work it out.
I cannot use a parameter.
I am supprised Oracle have not built in something for the fiscal year. I am using oracle 9i so i am unsure if 10g has something.
Think a litle more
Here is a hint:
-- the "year" part solution includes the words "sysdate" and "minus"
-- the "day" and "month" part of the solution includes the word "constant"
Pablo (Paul) Berzukov
Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width