June 21, 2009 at 11:11 pm
Jeff Moden (6/21/2009)
WayneS (6/20/2009)
You used:ROW_NUMBER() OVER(ORDER BY Seq)
It is producing the same thing as the Seq column by itself. Is there a reason why you went through the trouble to use the code you did instead of the column?In this case it is. There's no guarantee that no deletes will have been done on the source table in real life. Better to be safe by including the ROW_NUMBER to guarantee the proper operation.
Ahh, yes. Makes sense.
forest..... trees.....
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
June 21, 2009 at 11:14 pm
Jeff Moden (6/21/2009)
WayneS (6/20/2009)
Jeff Moden (6/20/2009)
BWAA-HAAA!!!! I felt exactly the same way waiting for the folks at work to do an upgrade (they're still not there). I finally broke down in Dec 2007 and bought a copy of the Developer's Edition just so I could try to keep up with the rest of the world.And have you since bought the 2008 Dev Edition? 😉
Nope... not yet.
Aw, come on Jeff. It's only $50, less at some of the online places if you look around. I'll probably spend that much buying your book when it comes out.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
January 4, 2011 at 9:13 pm
Ok, guys. Here's the progression ...
- Google: nope
- MSDN Help on Ranking functions: nope
- Experts Exchange: nope
- Start to write some God-awful RBAR code: hear mental admonishment from Jeff
- Search SQL Server Central: BINGO!!!
And it works over 7M rows like a charm!
You guys are awesome!
Kevin
--
Please upgrade to .sig 2.0
January 5, 2011 at 11:31 pm
knechod (1/4/2011)
Ok, guys. Here's the progression ...- Google: nope
- MSDN Help on Ranking functions: nope
- Experts Exchange: nope
- Start to write some God-awful RBAR code: hear mental admonishment from Jeff
- Search SQL Server Central: BINGO!!!
And it works over 7M rows like a charm!
You guys are awesome!
Kevin
Heh... ya gotta love one stop shopping, Kevin. 😀 Start here next time. 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply