Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Query to get Date Range Values

870354Jun 24 2011 — edited Aug 2 2011
Hi,

The database is Oracle11i.

I am looking for a way to generate list of dates from a fixed date in the past (could be hardcoded) to current day (sysdate).

That is, if the fixed date is 19 June 2011 and assuming that today is 24 June 2011 the SQL should be able to generate the

following:-

19-June-2011
20-June-2011
21-June-2011
22-June-2011
23-June-2011
24-June-2011

And the constraint is that I can't make any change to the database in question. I can only fire an SQL query (SELECT). No

usage of time dimension kind of approach (time dimension is not available here) and no procedures, PL/SQL etc. Is there any way?

Thanks
This post has been answered by sb92075 on Jun 24 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 30 2011
Added on Jun 24 2011
3 comments
629 views