Hi All,
I have the following records
MemberId,StartDate, EndDate, Status
1,2013-1-1, 2013-5-1 , Close
1,2013-5-11, 2013-6-1, Close
1,2013-6-23, 2013-9-1, Open
I want combing all the records into one, the logic is if the records MemberId is the same and the second order's Startdate - the first order's Enddate is less than 30, then Combine them and use the last records status.
So for the above example, that 3 records will be combined into one.
MemberId, StartDate, EndDate, Status
1,2013-1-1,2013-9-1, Open
Can we finish it?
Thanks.