Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing the last child record from same parent if seque
Message
 
 
To
29/06/2015 14:24:55
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2012
Application:
Web
Miscellaneous
Thread ID:
01621484
Message ID:
01621562
Views:
38
>>What did select * from cteRanges order by DateCol DESC return? Did you list rows in the opposite order of the date? If yes, then the query I wrote from the top of my head should work. If you provide a quick test scenario with create table and insert rows statements, I would be able to test it.
>
>This is getting too complex. We will simply execute the initial select two or three times and this will do it.

Nothing is complex here. Check this page for better understanding of my idea:

http://pratchev.blogspot.com/2010/02/refactoring-ranges.html
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform