I have a stored procedure which returns two columns Start and end dates. What will be stored procedure to convert into distinct dates list which include all of the dates in between as well.
Examples of Events:
StartDate EndDate
• 1/2/2012 6:00 - 1/2/2012 9:00
• 1/2/2012 11:00 - 1/2/2012 19:00
• 1/1/2012 11:00 - 1/5/2012 19:00
• 1/7/2012 11:00 - 1/8/2012 19:00
• 1/11/2012 11:00 - 1/11/2012 19:00
Result:
• 1/1/2012
• 1/2/2012
• 1/3/2012
• 1/4/2012
• 1/5/2012
• 1/7/2012
• 1/8/2012
• 1/11/2012
1 Answer