Skip to content
Advertisement

Row for each date from start date to end date

What I’m trying to do is take a record that looks like this:

and change it to look like this:

it can be done in Python but I am not sure if it is possible with SQL Oracle? I am having difficult time making this work. Any help would be appreciated.

Thanks

Advertisement

Answer

connect by level is useful for these problems. suppose the first CTE named “table_DT” is your table name so you can use the select statement after that.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement