Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with sql-query
Create table calendar( cal_name varchar2(255) not null,
cal_date date );
2) Populate that calendar with all the days for the year.
Insert into calendar
select 'TESTCAL', trunc(sysdate,'Year') + rownum -1
from all_objects where rownum<=365;
3) Use the calendar table as the driver for your queries
select * from calendar,
<yourtable>
![]() |
![]() |