Here's an example from postgres, I hope the dialects are comparable in regards to recursive
WITH RECURSIVE t(n) AS (
VALUES (1)
UNION ALL
SELECT n+1 FROM t WHERE n < 20
)
SELECT n FROM t;
...will return 20 records, numbers from 1 to 20
Cast/convert these to dates and there you are
UPDATE:
Sorry, don't have ORA here, but according to this article
SELECT
SYS_CONNECT_BY_PATH(DUMMY, '/')
FROM
DUAL
CONNECT BY
LEVEL<4;
gives
SYS_CONNECT_BY_PATH(DUMMY,'/')
--------------------------------
/X
/X/X
/X/X/X
It is also stated that this is supposed to be very efficient way to generate rows.
If ROWNUM can be used in the above select and if variable can be used in LEVEL condition then solution can be worked out.
UPDATE2:
And indeed there are several options.
SELECT (CAST('01-JAN-2010' AS DATE) + (ROWNUM - 1)) n
FROM ( SELECT 1 just_a_column
FROM dual
CONNECT BY LEVEL <= 20
)
orafaq states that: 'It should be noted that in later versions of oracle, at least as far back as 10gR1, operations against dual are optimized such that they require no logical or physical I/O operations. This makes them quite fast.', so I would say this is not completely esoteric.