December 10, 2014 at 11:56 pm
This was removed by the editor as SPAM
December 11, 2014 at 12:53 am
Nice question, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
December 11, 2014 at 12:55 am
Extremely easy!
The answer is in the title!
π
December 11, 2014 at 1:16 am
Carlo Romagnano (12/11/2014)
Extremely easy!The answer is in the title!
π
The answer might be in the title, but as a newbie I went through my usual process of reading the question, picking an answer after researching the question if needs be, then running the code to double check before actually selecting an answer. However when I did this, I got some data back so I changed my answer and got it wrong. Can anybody suggest why? I'm running 2012.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
December 11, 2014 at 1:25 am
BWFC (12/11/2014)
Carlo Romagnano (12/11/2014)
Extremely easy!The answer is in the title!
π
The answer might be in the title, but as a newbie I went through my usual process of reading the question, picking an answer after researching the question if needs be, then running the code to double check before actually selecting an answer. However when I did this, I got some data back so I changed my answer and got it wrong. Can anybody suggest why? I'm running 2012.
The question is what would be the output in the message pane, not the number of rows returned in the results pane.. Judging by the number of people also going for the number of actual records returned (including myself!) many are tripping up on this question and mis-reading the intention
December 11, 2014 at 1:28 am
D'OH!!!!!!!!!!!!!!!! :pinch:
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
December 11, 2014 at 1:53 am
Missread the intention of the query. Knew NOCOUNT would return no counts, but thought it was about what should have been returned! Doh!!!
Nice question and interesting use of the two values clauses.
December 11, 2014 at 3:37 am
Arthur Olcot (12/11/2014)
BWFC (12/11/2014)
Carlo Romagnano (12/11/2014)
Extremely easy!The answer is in the title!
π
The answer might be in the title, but as a newbie I went through my usual process of reading the question, picking an answer after researching the question if needs be, then running the code to double check before actually selecting an answer. However when I did this, I got some data back so I changed my answer and got it wrong. Can anybody suggest why? I'm running 2012.
The question is what would be the output in the message pane, not the number of rows returned in the results pane.. Judging by the number of people also going for the number of actual records returned (including myself!) many are tripping up on this question and mis-reading the intention
Actually the question is "How many rows will be affected in the Message Pane" which of course is very sloppy phrasing that doesn't really make any sense; perhaps most people will correctly guess what it was intended to mean (you have, clearly, and I did, in fact probably nearly half of the people who have tried it did as nearly half the answers so far are correct) but others may be confused by it.
This is a nice question, but would have been a much better question if it had been worded correctly.
Tom
December 11, 2014 at 4:57 am
Arthur Olcot (12/11/2014)
BWFC (12/11/2014)
Carlo Romagnano (12/11/2014)
Extremely easy!The answer is in the title!
π
The answer might be in the title, but as a newbie I went through my usual process of reading the question, picking an answer after researching the question if needs be, then running the code to double check before actually selecting an answer. However when I did this, I got some data back so I changed my answer and got it wrong. Can anybody suggest why? I'm running 2012.
The question is what would be the output in the message pane, not the number of rows returned in the results pane.. Judging by the number of people also going for the number of actual records returned (including myself!) many are tripping up on this question and mis-reading the intention
It isn't. Here's the question again: "How many rows will be affected in the Message Pane from the below query?" and the answer of course is 1. That single row contains the text "One row(s) affected" or whatever.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 11, 2014 at 4:59 am
Tricky question, but very nice as well, I was about to choose the (1 row(s) affected) option, but re-read the qusetion slowly, got it right.
Thanx π
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
December 11, 2014 at 5:02 am
Carlo Romagnano (12/11/2014)
Extremely easy!The answer is in the title!
π
+1 π
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
December 11, 2014 at 6:42 am
Stewart "Arturius" Campbell (12/10/2014)
Interesting question, thanks ShivaNever thought of doing an implicit cross join of two VALUES constructs before...
Same here. That's what caught my attention.
December 11, 2014 at 7:10 am
I'm to the point now if Shiva N posts the question, I'm skipping it.
December 11, 2014 at 7:27 am
The message pane was the clue that we needed to be in grid mode, not text mode. Then seeing the no count on made the answer jump out for me. I use that feature in most of my stored procedures.
Viewing 15 posts - 1 through 15 (of 29 total)
You must be logged in to reply to this topic. Login to reply