Here is an example from postgres, I hope dialects are comparable with respect 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 Send / convert them to dates and there you are
UPDATE: Sorry, there is no ORA, 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 pointed out that this should be a very efficient way of generating strings. If ROWNUM can be used in the above selection, and if the variable can be used in LEVEL state, then a solution can be developed.
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 the oracle, at least another 10gR1, operations against dual are optimized so that they do not require any logical or physical I / O operations. This makes them pretty fastβ, therefore I would say that this is not entirely esoteric.
source share