I have a situation where I have a record that has an effective duration, based on days. Ie: There is a start and end date for the active period of my entity. I need a query to generate a set that spans the record over each day that it is active.
For instance, if it is active from Jan 5 to Jan 10, then I need 1 record for each of Jan 5, through to Jan 10.
Ultimately if I could get an Oracle SQL query to return a row, counting from 1 to n, for the n days of the duration I could easily figure out the date. Does anyone know how to return a set of rows, in which a column simply contains a number that grows from 1 to n?
For instance, if it is active from Jan 5 to Jan 10, then I need 1 record for each of Jan 5, through to Jan 10.
Ultimately if I could get an Oracle SQL query to return a row, counting from 1 to n, for the n days of the duration I could easily figure out the date. Does anyone know how to return a set of rows, in which a column simply contains a number that grows from 1 to n?