If I have a table with a StartDate column and an EndDate column can I produce a query that returns a set including every day in the range. I could use a table variable and do some procedural code but I'd like to know if there's a way to do it in a query.
E.g. StartDate = 1/1/2010, EndDate = 1/5/2010, result would be:
- 1/1/2010
- 1/2/2010
- 1/3/2010
- 1/4/2010
- 1/5/2010
...for every row in the table that has the StartDate and EndDate columns.
*I'm on SQL 2005