for each from/to date in table, select days between from/to date?
- From: "mark" <markpinks@xxxxxxxxxxx>
- Date: Mon, 27 Feb 2006 11:23:12 -0000
Hi
I have a 'NAMES' table:
NAME COLOUR FROMDATE TODATE
Fred Green 01-JAN-2006 04-JAN-2006
Bob Red 07-JAN-2006 09-JAN-2006
Alf Blue 12-JAN-2006 13-JAN-2006
In one query, for each row, I want to return a row for each day between the
FROMDATE and the TODATE, inclusive.
So, for the first row, you'd get:
NAME COLOUR DAY
Fred Green 01-JAN-2006
Fred Green 02-JAN-2006
Fred Green 03-JAN-2006
Fred Green 04-JAN-2006
etc. So overall, you'd get:
NAME COLOUR DAY
Fred Green 01-JAN-2006
Fred Green 02-JAN-2006
Fred Green 03-JAN-2006
Fred Green 04-JAN-2006
Bob Red 07-JAN-2006
Bob Red 08-JAN-2006
Bob Red 09-JAN-2006
Alf Blue 12-JAN-2006
Alf Blue 13-JAN-2006
Ideally, it'd be in one query. It looks easier than it is, unless I'm being
dumb.
Thanks you so much if you can help!!
.
- Follow-Ups:
- Prev by Date: Query problem - compare date in first record to date in next record
- Next by Date: Currency sign ASCII value 164 ¤
- Previous by thread: Query problem - compare date in first record to date in next record
- Next by thread: Re: for each from/to date in table, select days between from/to date?
- Index(es):
Relevant Pages
|
|