Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sql - list all dates in month, year etc
You might try using PL/SQL and loop where date is <= last_day()
Steve Corbett <stevec_at_fcs.wa.gov.au> wrote in article
<33D311F6.35F8_at_fcs.wa.gov.au>...
> is there anything like 'select sysdate from dual' that will list all the
> dates in a particular month or year etc? without having to have a table
> of all possible dates?
> i want to join this list to another table to end up with something like:
> Date Count
> 01-FEB-97 3
> 02-FEB-97 0
> 03-FEB-97 2
> 04-FEB-97 0
> ...
> 28-FEB-97 9
>
> that is, i want the date listed even if the count is zero.
>
> pre-thanks,
> --
> Steve Corbett. Perth Australia .
> stevec_at_fcs.wa.gov.au
> scorbett_at_perth.dialix.oz.au
>
Received on Mon Jul 21 1997 - 00:00:00 CDT