April 11, 2009 at 2:20 pm
I missed one... there is one solution above that takes an IDENTITY column into consideration.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 11, 2009 at 2:22 pm
mister.magoo (4/11/2009)
Jeff Moden (4/11/2009)
Oh... be careful folks... this wonderful and great interplay of thoughts and ideas to come up with some absolutely outstanding code all share the same common fault... they all can and eventually will produce an incorrect answer because there is nothing in the original posted data nor any of the followup posts to guarantee the order listed in the first post.Agreed, that is why I said
Also, it is kind of unreliable without a row id to start with...
But as an exercise in teaching some different techniques it is still worthwhile. 🙂
You'll get no argument from me there... that's why I called it a "wonderful and great interplay". Still, your good comment didn't slow them down a bit and I thought the inherent unreliability for the correct order was worth mentioning again. 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply