Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing the last child record from same parent if seque
Message
 
 
À
29/06/2015 14:24:55
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01621484
Message ID:
01621562
Vues:
39
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform