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 -> one row for each day in date range ? [opposite of 'join' ?]

one row for each day in date range ? [opposite of 'join' ?]

From: Richard Shea <rshea_at_my-deja.com>
Date: 11 Sep 2001 02:54:10 -0700
Message-ID: <43160f6f.0109110154.6cd76275@posting.google.com>


Hi - I've got a table with two columns :

datefrom
dateto

I would like to produce a view which contained (for each record selected) a row for each day in the range. That is if I selected one row with values :

datefrom=2001-09-01
dateto=2001-09-05

I got in the view something like this :

deriveddate      datefrom     dateto
2001-09-01       2001-09-01   2001-09-05
2001-09-02       2001-09-01   2001-09-05
2001-09-03       2001-09-01   2001-09-05
2001-09-04       2001-09-01   2001-09-05
2001-09-05       2001-09-01   2001-09-05

It seems to me this is sort of the opposite of 'group by' !

Anyone got any ideas ?

thanks

richard shea. Received on Tue Sep 11 2001 - 04:54:10 CDT

Original text of this message

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