Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle Date SQL challenge
Here is the problem:
given a min and a max date, create a SQL statement to return a date for each day between min_date and max_date (ie, for use in the creation of a view).
min(start_date) and max(start_date) are in a table, and I want to get a list of all days between them (but not all are in that table, since it does not include Sat, Sun, and Holidays).
This gets tricky - If I have just 2 days: 1-jan and 10-jan, I still want to return 10 rows, 1 for each date.
Any ideas? Yes, I could always write a PL/SQL procedure to do this, but I was wondering if there was a simple SQL statement that might also work. Thx.. Received on Tue Aug 11 1998 - 15:23:17 CDT
![]() |
![]() |