------------------------- Commands Entered -------------------------
SELECT start_date + (n2*10+n1) DAYS AS Inter_dates
FROM (VALUES (DATE('2006-1-1'), DATE('2006-1-31'))) Q (Start_date,
End_date)
, (VALUES 0,1,2,3,4,5,6,7,8,9) P1(n1)
, (VALUES 0,1,2,3,4,5,6,7,8,9) P2(n2)
WHERE (n2*10+n1) <= DAYS(End_date) - DAYS(Start_date)
ORDER BY
Inter_dates
;
--------------------------------------------------------------------
INTER_DATES
-----------
2006-01-01
2006-01-02
2006-01-03
2006-01-04
2006-01-05
2006-01-06
2006-01-07
2006-01-08
2006-01-09
2006-01-10
2006-01-11
2006-01-12
2006-01-13
2006-01-14
2006-01-15
2006-01-16
2006-01-17
2006-01-18
2006-01-19
2006-01-20
2006-01-21
2006-01-22
2006-01-23
2006-01-24
2006-01-25
2006-01-26
2006-01-27
2006-01-28
2006-01-29
2006-01-30
2006-01-31
31 record(s) selected.
Or, you can use recursive query.