February 18, 2016 at 9:27 am
I've a table having data as below -
CodeStartDate EndDate
SL 2011-04-04 2011-07-31
SL 2011-04-04 2069-09-17
VA 2011-08-01 2015-04-30
VA 2011-08-01 2069-09-17
VA 2015-05-01 2015-05-31
VA 2015-05-01 2069-09-17
SL 2015-06-01 2016-01-31
SL 2015-06-01 2016-02-29
SL 2015-06-01 2069-09-17
VA 2016-02-01 2069-09-17
VA 2016-03-01 2069-09-17
I want to link all the sets and give an output where we have the full set of codes and I can find out which code was active at what time.
I need out put as below -
SL 2011-04-04 2011-07-31
VA 2011-08-01 2015-04-30
VA 2015-05-01 2015-05-31
SL 2015-06-01 2016-02-29
VA 2016-03-01 2069-09-17
Please help.
____________________________________________________________
APFebruary 18, 2016 at 9:48 am
Not to be rude, but you should know this by now:
http://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply