July 24, 2009 at 8:22 am
ChandraMohan Nandula (7/23/2009)
Hi Jeff,Thanks a lot for providing the solution. I will check it and revert back to you.
Thanks, Chandra. I appreciate the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 24, 2009 at 8:26 am
. (7/24/2009)
I just want to say again that your solution was really pretty Jeff. Mine was also based on a ctes using row_number(), but yours was much faster and more concise. I never thought to use row_number() twice in one statement.
Thanks. Bob. I can't take the credit for it though. It's one of those nifty tricks that I recently learned (about 3 months ago). There was a post about someone winning a contest with that same method... it was the only thing that beat the "quirky" update method (it didn't win by much but has the advantage of being able to do it in a single query instead of using a temp table, meaning that it can be used in a view if necessary). It was one of the few times that I labeled someone's code as "freakin' brilliant". Obviously, I was greatly impressed.
I'll see if I can find the URL that started it all on this method if you're interested.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 24, 2009 at 8:30 am
No need. I have already filed the solution you posted in my toolbox. Thanks 🙂
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 24, 2009 at 8:51 am
Actually Jeff, please do post the url when you find it.
July 24, 2009 at 9:49 am
No, no, no. Don't post it whatever you do!!
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 24, 2009 at 10:14 am
.,.,., why not let Jeff post the url? Others, like myself, may just benefit ... oh, you want to keep us in the dark, like mushrooms! 😛
July 24, 2009 at 10:17 am
My wife phrases it "Keep us in the dark and feed us manure."
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 24, 2009 at 4:31 pm
Lynn Pettis (7/24/2009)
.,.,., why not let Jeff post the url? Others, like myself, may just benefit ... oh, you want to keep us in the dark, like mushrooms! 😛
Agh... he's just kidding...
http://www.sqlmag.com/article/articleid/93462/sql_server_blog_93462.html identifies the problem
http://www.sqlmag.com/Articles/ArticleID/93606/93606.html identifies the solution
Anyone got some steak to go with those shrooms? 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
July 24, 2009 at 4:44 pm
Jeff Moden (7/24/2009)
Lynn Pettis (7/24/2009)
.,.,., why not let Jeff post the url? Others, like myself, may just benefit ... oh, you want to keep us in the dark, like mushrooms! 😛Agh... he's just kidding...
http://www.sqlmag.com/article/articleid/93462/sql_server_blog_93462.html identifies the problem
http://www.sqlmag.com/Articles/ArticleID/93606/93606.html identifies the solution
Anyone got some steak to go with those shrooms? 😛
First, like duh... I know that.
Second, I actually don't appreciate mushrooms, so I usually don't eat them unless my wife has cooked with them and chopped them small.
July 26, 2009 at 11:55 pm
Hi,
Thanks a lot Jeff and Lynn. It worked very well.
[font="Verdana"]Thanks
Chandra Mohan[/font]
July 27, 2009 at 6:05 am
You bet, Chandra... thanks for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 11 posts - 16 through 25 (of 25 total)
You must be logged in to reply to this topic. Login to reply