March 7, 2017 at 6:24 am
I have a table with 3 fields task , Start Date, End Date and data like below
Task StartDate EndDate
Task1 1/1/2017 1/1/2017
Task2 1/1/2017 1/5/2017
I want to write an query which will provide me results like
Task WorkDate
Task1 1/1/2017
Task2 1/1/2017
Task2 1/2/2017
Task2 1/3/2017
Task2 1/4/2017
Task2 1/5/2017
March 7, 2017 at 6:38 am
Try joining to a calendar table
http://www.sqlservercentral.com/articles/calendar/145206/
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy