sql >> Base de Datos >  >> RDS >> Oracle

Generar rango de fechas a partir de dos columnas de fechas

Puede usar un connect by consulta usando prior + sys_guid() truco

select id,start_date + level - 1 as "date", field1 from t 
connect by level <= end_date - start_date  + 1
    and prior id = id
and prior sys_guid() is not null;

DEMOSTRACIÓN