When I was working for a tool in Apex some time back, need some scripts on automatic date generation, after some googling and changing the modified ones, here are some scripts that useful to generate a date in sequence etc.
Generating dates for a month
===================
select to_date('01 2010','MM YYYY')-1 + level as DateRange from dual where (to_date('12 2010','MM YYYY')-1+level) <= last_day(to_date('12 2010','MM YYYY')) connect by level<=31
Generating sequence of dates
====================
SELECT TO_DATE('01-JAN-2010') + ROWNUM - 1
FROM (
SELECT ROWNUM FROM (
SELECT 1 FROM DUAL
CONNECT BY LEVEL <= (TO_DATE('01-DEC-2010') - TO_DATE('01-JAN-2010'))
)
);
Generate Each Friday
==================
SELECT each_day "friday"
FROM (SELECT (SYSDATE - 60) + LEVEL each_day
FROM DUAL
CONNECT BY LEVEL <= 365)
WHERE TO_CHAR (each_day, 'D') = '6' order by 1
Have fun using them!!!
Geek DBA
Follow Me!!!