Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle Date SQL challenge

Oracle Date SQL challenge

From: Allen <allenh_at_Starbase.NeoSoft.COM>
Date: 11 Aug 1998 15:23:17 -0500
Message-ID: <6qq97l$gdo$1@Starbase.NeoSoft.COM>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US