I need help on making a query that will report from a date range of (the current date - 12 months) to (the current date). I need the previous 12 months worth of data reported whenever the report is run.
surely you can justbuild a pre defined condition doing a between on your calendar table using a systemdate (sysdate, getdate() ) etc depending what database you are reporting aginst.
Hi,
You can do it by first taking a sysdate and then checking the date in record wheather it is a year behind to sysdate or not. Populate only those records which are satisfying the condition. Sysdate you can select from any table by giving condition of rownum=1.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.