Generating dates between two dates
select
A.ID,
A.START_DATE+delta dt
from
t_dates A,
(
select level-1 as delta
from dual
connect by level-1 <= (
select max(end_date - start_date) from t_dates
)
)
where A.START_DATE+delta <= A.end_date
order by 1, 2
Please try:
select
distinct ID,
START_DATE+level-1 DATES
from dual a, TABLE_DATES b
connect by level <= (END_DATE-START_DATE)+1
order by ID;