January 21, 2009 at 2:22 pm
Bob Hovious (1/21/2009)
Grant Fritchey (1/21/2009)
It sounds more like a Monty Python sketch to me.Hmmmmm......
----------------------------------------------------
"This query is dead."
"No, it's merely stunned. See, it's using a cursor...."
"It's written in Norwegian SQL and its pining for the fjords...."
----------------------------------------------------
"Nobody ever expects The SQL Inquistion."
"Our three primary weapons are fear, surprise, ruthless efficiency, and a close examination of execution plans.... FOUR... our FOUR primary weapons are...."
"Cardinal Moden... hit him with the pork chop...."
ROTFLMAO! I LOVE IT!
January 21, 2009 at 2:38 pm
Not ready is he. Be back he may be.
January 21, 2009 at 2:43 pm
Lynn,
I've been following the other thread mentioned above. Based on the expected outcome he just posted (which had exactly 0 relation to the sample data provided), if you choose to continue with this person's education, I'll be forced to either nominate you for sainthood or have you committed for psychiatric evaluation.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. In this case you should probably recommend he become a vegetarian.
January 21, 2009 at 2:51 pm
David Webb (1/21/2009)
Lynn,I've been following the other thread mentioned above. Based on the expected outcome he just posted (which had exactly 0 relation to the sample data provided), if you choose to continue with this person's education, I'll be forced to either nominate you for sainthood or have you committed for psychiatric evaluation.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. In this case you should probably recommend he become a vegetarian.
I think he gave up on me. Looking at the expected output I know he also left out vital information regarding the data that would be needed to meet his expected results. In actuality, I think he needs 3 queries to meet the desired results, not 1.
January 21, 2009 at 2:55 pm
David Webb (1/21/2009)
Lynn,I've been following the other thread mentioned above. Based on the expected outcome he just posted (which had exactly 0 relation to the sample data provided), if you choose to continue with this person's education, I'll be forced to either nominate you for sainthood or have you committed for psychiatric evaluation.
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. In this case you should probably recommend he become a vegetarian.
The more I read of it and the better a "hunger strike" was starting to sound.....
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
January 21, 2009 at 3:03 pm
It took 4 hours and 21 posts before he finally provided anything useful (but still missing the expected results) to even start coming up with anything useful. Took less than an hour to return something to him that wasn't a function.
Oh well, win some, lose some.
January 21, 2009 at 3:09 pm
David Webb (1/21/2009)
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
Yes, and HIT a man with a fish hard enough and he might learn to think for himself.
😛
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
January 21, 2009 at 3:13 pm
RBarryYoung (1/21/2009)
David Webb (1/21/2009)
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.Yes, and HIT a man with a fish hard enough and he might learn to think for himself.
😛
Maybe my constantly asking for expected output based on the sample data provided was my HITTING him with a fish. He did walk away saying he'd figure it out from where I had it.
We'll see if he posts back a resolution or not.
January 21, 2009 at 6:53 pm
David Webb (1/21/2009)
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. In this case you should probably recommend he become a vegetarian.
Ah.... but feed a man a high speed pork chop at point blank range, and he'll remember for 2 lifetimes. 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
January 21, 2009 at 6:55 pm
RBarryYoung (1/21/2009)
David Webb (1/21/2009)
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.Yes, and HIT a man with a fish hard enough and he might learn to think for himself.
😛
Hmmmm.... might have to switch from pork chops... seems like fish fit in the cannon better and come pre-lubricated. 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
January 21, 2009 at 7:14 pm
Jeff Moden (1/21/2009)
RBarryYoung (1/21/2009)
David Webb (1/21/2009)
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.Yes, and HIT a man with a fish hard enough and he might learn to think for himself.
😛
Hmmmm.... might have to switch from pork chops... seems like fish fit in the cannon better and come pre-lubricated. 😛
hmmm, Straight from the Cardinal, yes.
January 21, 2009 at 10:31 pm
... and, with fish, you can DANCE!!
http://en.wikipedia.org/wiki/The_Fish-Slapping_Dance
http://www.youtube.com/watch?v=IhJQp-q1Y1s
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
January 24, 2009 at 11:45 am
Gail has complained about the really ignorant answers that some folks place on the forum. I've got a perfect example of such ingnorance and it really burns me up that these people try to come across as actually knowing what the hell they're talking about.
A perfect example can be found at the following link..
http://www.sqlservercentral.com/Forums/Topic642789-338-1.aspx#bm642945
For your convenience, the post says...
"Set based solutions tend to be faster than the RBAR operations while taking less system resources. Doing a task 100 times is much likely to take more time than doing one task that does 100 actions.
RBAR operations have thier place in administration but not in OLTP systems. Set based solutions often appear to be complex but once you know the SQL, it will be easy. Mostly newcomers tend to use RBAR operations because of thier relative ease in using them.
http://www.simple-talk.com/sql/t-sql-programming/rbar--row-by-agonizing-row/
"
So... what's wrong with that? First click on that second link and see where they used a while loop to replace a cursor and also used an "ordered" correlated sub-query. Both are forms of RBAR and should never be used to replace a cursor.
Second, take a look at the following URL and the code this sot posted as a solution...
http://www.sqlservercentral.com/Forums/Topic641682-338-1.aspx#bm642949
[font="Arial Black"]Ready on the right? Ready on the left? Ready on the firing line! Commence firing!!! PORK CHOPS AWAY!!![/font]
http://www.sqlservercentral.com/Forums/Topic642789-338-1.aspx#bm643014
[font="Arial Black"]WHAM!!![/font]
--Jeff Moden
Change is inevitable... Change for the better is not.
January 24, 2009 at 12:29 pm
Heh. You know, I always have to follow these links to make sure that you aren't talking about me. Thank goodness too, I prefer my pork chops a plateful at a time!
Seriously though, his heart seems to be in the right place wrt to "RBAR". I think that a little gentle correction from the guy who coined the term would probably fix his misunderstandings. 🙂
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
January 24, 2009 at 12:41 pm
RBarryYoung (1/24/2009)
Heh. You know, I always have to follow these links to make sure that you aren't talking about me. Thank goodness too, I prefer my pork chops a plateful at a time!Seriously though, his heart seems to be in the right place wrt to "RBAR". I think that a little gentle correction from the guy who coined the term would probably fix his misunderstandings. 🙂
I do the same thing.
I freely admit that I post RBAR code and solutions sometimes. I usually include a note that there are more efficient ways to solve the problem.
I am a big believer in "Le mieux est l'ennemi du bien" - for many one-time, small-record count operations I often use RBAR solutions just to get things done right away.
Viewing 15 posts - 901 through 915 (of 66,749 total)
You must be logged in to reply to this topic. Login to reply