How do I select dates between two given dates in an Oracle query?
Advertisement
Answer
SELECT TO_DATE('12/01/2003', 'MM/DD/YYYY') - 1 + rownum AS d FROM all_objects WHERE TO_DATE('12/01/2003', 'MM/DD/YYYY') - 1 + rownum <= TO_DATE('12/05/2003', 'MM/DD/YYYY')
from
http://forums.devshed.com/oracle-development-96/select-all-dates-between-two-dates-92997.html