July 20, 2011 at 10:33 am
Carlo Romagnano (7/20/2011)
But if that is not the case then the answer should be "There is NO query returning rows."
I agree with you!
Ditto.
July 20, 2011 at 10:45 am
cengland0 (7/20/2011)
BenWard (7/20/2011)
From my PoV the QotD is there, not as a status symbol or as bragging points but rather to help us do our jobs better.Sorry but this one will not help me do my job better. It only serves to give me anxiety and provokes an emotion of rage.
Not point out a place for potential syntax errors? Shorten debugging?
I was torn on running it, but decided it might be an interesting one for people to learn something.
July 20, 2011 at 10:48 am
Steve Jones - SSC Editor (7/20/2011)
cengland0 (7/20/2011)
BenWard (7/20/2011)
From my PoV the QotD is there, not as a status symbol or as bragging points but rather to help us do our jobs better.Sorry but this one will not help me do my job better. It only serves to give me anxiety and provokes an emotion of rage.
Not point out a place for potential syntax errors? Shorten debugging?
I was torn on running it, but decided it might be an interesting one for people to learn something.
I thought the question was a good one but the choice of answers (and its phraseology) was not.
July 20, 2011 at 10:56 am
Michael Poppers (7/20/2011)
Steve Jones - SSC Editor (7/20/2011)
cengland0 (7/20/2011)
BenWard (7/20/2011)
From my PoV the QotD is there, not as a status symbol or as bragging points but rather to help us do our jobs better.Sorry but this one will not help me do my job better. It only serves to give me anxiety and provokes an emotion of rage.
Not point out a place for potential syntax errors? Shorten debugging?
I was torn on running it, but decided it might be an interesting one for people to learn something.
I thought the question was a good one but the choice of answers (and its phraseology) was not.
Yes and as I said Steve and I both struggled on this one (phrasing and running it or not).
Bottom line for me was that the best way was to run it, ask for feedback to figure it all out and do better on the next one. I think I can say mission accomplished on those goals.
Thanks to all who've provided invaluable suggestions.
July 20, 2011 at 11:18 am
Well, I think this was a useful reminder to us to actually look at the code
I agree. Part of our job would be to review code. This shows what could happen if it got by.
Unfortunately, in this case the purpose of the question was to highlight a problem with code, yet so many times we get unintentional problems with code on the QOD that it overshadows questions such as this one.
Steve Jimmo
Sr DBA
“If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
July 20, 2011 at 11:31 am
sjimmo (7/20/2011)
Well, I think this was a useful reminder to us to actually look at the code
I agree. Part of our job would be to review code. This shows what could happen if it got by.
Unfortunately, in this case the purpose of the question was to highlight a problem with code, yet so many times we get unintentional problems with code on the QOD that it overshadows questions such as this one.
"Anakin, you're focusing on the negative. Be mindful of your thoughts."
?Obi-Wan Kenobi[src]
Do I have a tendency to post untested code?
As I said earlier I'm not perfect, but I think I have a good track record there :-).
July 20, 2011 at 11:56 am
You got me... 🙁
Thanks for the question.
---------------------------------------------------------------------
Use Full Links:
KB Article from Microsoft on how to ask a question on a Forum
July 20, 2011 at 12:05 pm
Trey Staker (7/20/2011)
You got me... 🙁Thanks for the question.
You're welcomed.
And join the club, I'm the founding member :-D.
July 20, 2011 at 12:57 pm
The funny part about this was that I saw the UNION ALL and realized that it was only going to return a # of rows affected. But instead of selecting an answer of 0, I overthought it and selected "It depends". Why? Because the question was about how many rows were returned - and I didn't know if we were talking about the actual number of rows from the query - or the number of rows in the messages response. And the number of rows returned from the message depends on how you have your query options set... If, for example, you have set showplan_text checked, you'll get a lot more than 0 rows back.
I should have stuck with the easy answer (0), and not looked for an *additional* trick to the question. :hehe:
-Ki
July 20, 2011 at 1:02 pm
Ninja's_RGR'us (7/20/2011)
Please join in on the fun and tell us about the last time you felt foolish about yourself!
Oh, that happens on a daily basis! 😀
Yesterday morning I was trying to debug an application where a memory buffer was being overwritten at a very odd time. I checked. I rechecked. I pulled out code I'd written the day prior that worked perfectly, and was identical except for variable names.
I eventually found the problem. In the vendor's API I was working in, these memory buffers have both a name for an empty "null" buffer and the name for the buffer that has data in it.
I'd used the name of the buffer with data in it in an initialization call where the name of the null buffer was supposed to be.
One letter off. Completely unexpected results.
On something I should be able to do in my sleep.
Yup - I felt foolish!
-Ki
July 20, 2011 at 1:07 pm
Kiara (7/20/2011)
Ninja's_RGR'us (7/20/2011)
Please join in on the fun and tell us about the last time you felt foolish about yourself!
Oh, that happens on a daily basis! 😀
Yesterday morning I was trying to debug an application where a memory buffer was being overwritten at a very odd time. I checked. I rechecked. I pulled out code I'd written the day prior that worked perfectly, and was identical except for variable names.
I eventually found the problem. In the vendor's API I was working in, these memory buffers have both a name for an empty "null" buffer and the name for the buffer that has data in it.
I'd used the name of the buffer with data in it in an initialization call where the name of the null buffer was supposed to be.
One letter off. Completely unexpected results.
On something I should be able to do in my sleep.
Yup - I felt foolish!
:w00t: thanx for the chuckle!
July 20, 2011 at 1:50 pm
Excellent topic for a QOTD. It had me wondering if recursive selects would work as input to an insert. For a bit, anyway. So, even though I (and plenty of other folks) realized that the correct answer would be zero rows RETURNED, it still made me think about what would happen. Tried to come up with answer based on daily newsletter version first, and was surprised after jumping to the official question that "error message -- cannot recurse selects to an Insert" wasn't one of the alternatives. From there, zero was the only choice.
July 20, 2011 at 2:12 pm
Ninja's_RGR'us (7/20/2011)
:w00t: thanx for the chuckle!
I think I've found your master plan. Keep our points low by putting a tricky question up while increasing your own by replying to posts in the lengthy discussions that ensues. Come on, share the points. There are starving newbies out there! 🙂
July 20, 2011 at 2:23 pm
cfradenburg (7/20/2011)
Ninja's_RGR'us (7/20/2011)
:w00t: thanx for the chuckle!I think I've found your master plan. Keep our points low by putting a tricky question up while increasing your own by replying to posts in the lengthy discussions that ensues. Come on, share the points. There are starving newbies out there! 🙂
I think you'll have to post your own tricky question for that... 😉
July 20, 2011 at 2:23 pm
cfradenburg (7/20/2011)
Ninja's_RGR'us (7/20/2011)
:w00t: thanx for the chuckle!I think I've found your master plan. Keep our points low by putting a tricky question up while increasing your own by replying to posts in the lengthy discussions that ensues. Come on, share the points. There are starving newbies out there! 🙂
Check my history, I think this is ony the 2nd question I post. The first one was actually much easier so I don't think I go many points from that one.
http://www.sqlservercentral.com/Forums/Topic908285-1198-1.aspx
There was a bit of an argument because I had done the insert with sql 2008 syntax and not specified the version in the question (posted in april 2k10 so I assumed that sql 2k8 was the default for most). But other than that it went pretty well and got very little points credits.
As incredible as it might seem, I actually answer real questions to get my points! Out of 14K forum posts, I think I have 1-2 posts in there that provide actual value to the question at hand ;-).
Viewing 15 posts - 136 through 150 (of 200 total)
You must be logged in to reply to this topic. Login to reply