November 30, 2011 at 5:22 am
I never even noticed the typo, my brain just equated "v3=v2" to "v2=v3" and saw them as the same thing.
Guess it's a good job I'm tired 🙂
November 30, 2011 at 5:40 am
Good question, excellent explanation. Now please explain:
Crois-tu qu'on s'enivre pour s'amuser? Etre ivrogne ce n'est pas une sinécure... Si tu savais l'attention et la persévérance qu'il faut! Toujours à remplir des verres et à les vider. On vous prend pour un riche oisif, en fait c'est un travail de plongeur.
I was curious when I saw "plonguer", even though I don't speak French. (German, Greek, and Spanish, but no French) The word caught my eye because, in my misspent youth, I read "Down and Out in Paris and London", where, I believe, Orwell was a "plonguer" - the lowest of the low - a dishwasher. Or, am I fooled by a similar word? (The rest of the sig line I was able to translate using an online translator. But, it translated "plonguer" to "diver", which didn't seem to fit the context.)
Later: Duh, must be a slang use of the word for diver in reference to diving into the sink after dishes! Too literal this morning.
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
November 30, 2011 at 5:44 am
stupid erroneous repsonse to comment. edited away.
Tom
November 30, 2011 at 5:48 am
stupid erroneous response edited out.
Tom
November 30, 2011 at 5:51 am
erroneous post
Tom
November 30, 2011 at 5:53 am
L' Eomot Inversé (11/30/2011)
Henrico Bekker (11/29/2011)
even though x=y, and y=x, your case statement catered for the following result:
'v3 = v2'
and no where specifies v2=v3."None of the Above" should be correct as well.
The question is what does the select statement return, not what could some different select statement have returned, so I think perhaps you should look again and try to understand teh question properly.
Hi Tom, if the question is "what would the statement return" then "v3=v2" is in fact correct, because that is what is returned when executing the code.
I have read the question, thats why I didnt see 'v2=v3' being returned. My point is, the correct answer involves text that wasnt in the question, as it was hardcoded text, and executing it like you posted it would not return what you set as the right answer.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
November 30, 2011 at 5:55 am
Since the version is not specified if this is run on SQL Server 2005 then the Answer needs to be None of the above. Why do we ask.... Time is not a valid system type in SQL Server 2005 and is only avail in 2008 and above. Way was that not specified in the QOD?
November 30, 2011 at 5:56 am
Tom, please double check the question. The SQL text contains the string constant 'v3 = v2' as one of the CASE results. The correct answer option reads v2 = v3. As you can see, the order of the two variable names is reversed.
The intention is very clear, but all the people who commented that this is a typo and that the answer is technically incorrect are in fact right.
November 30, 2011 at 5:57 am
Removed.
I must learn to read first, write later. Sorry!
November 30, 2011 at 5:58 am
Cadavre (11/30/2011)
Got it wrong because I believe it should say "v3 = v2" not "v2 = v3"
L' Eomot Inversé (11/30/2011)
wloong (11/29/2011)
I agreed!From the programming logic, "v2 = v3" could not be displayed! In fact, the right answer should be "None of the above". If the editor admit that it is a typo mistake, then both "v2 = v3" and "None of the above" should be correct in order to be fair.
There isn't a typo. The select statement as written can't return v2=v3 in any of ths ecolumns of the resulting row: as you yourself state, the programming logic does not permit v2 = v3 to be displayed, so how could it imaginably be correct to say it return v2 = V3 in one of the columns?
If you run the code you will certaily see that "none of the above" is not the correct answer, because it returns one of the rows listed.
Yes Tom, but the "correct" answer states v2=v3 not v3=v2.
November 30, 2011 at 6:10 am
Thomas Abraham (11/30/2011)
Good question, excellent explanation. Now please explain:Crois-tu qu'on s'enivre pour s'amuser? Etre ivrogne ce n'est pas une sinécure... Si tu savais l'attention et la persévérance qu'il faut! Toujours à remplir des verres et à les vider. On vous prend pour un riche oisif, en fait c'est un travail de plongeur.
I was curious when I saw "plonguer", even though I don't speak French. (German, Greek, and Spanish, but no French) The word caught my eye because, in my misspent youth, I read "Down and Out in Paris and London", where, I believe, Orwell was a "plonguer" - the lowest of the low - a dishwasher. Or, am I fooled by a similar word? (The rest of the sig line I was able to translate using an online translator. But, it translated "plonguer" to "diver", which didn't seem to fit the context.)
Later: Duh, must be a slang use of the word for diver in reference to diving into the sink after dishes! Too literal this morning.
Your first guess was correct - a slang term for dishwasher (actually underpaid dishwasher, it dates from the era when most restaurant staff in most restaurants in France weren't paid by the restaurant - a dishwasher got a share of the waiters' tips, not a big one, in many restaurants the waiters had to pay the proprietor for the privilege of having the waiting job and the chance to earn tips so they didn't want to share much.
Tom
November 30, 2011 at 6:17 am
Henrico Bekker (11/30/2011)
Hi Tom, if the question is "what would the statement return" then "v3=v2" is in fact correct, because that is what is returned when executing the code.
I have read the question, thats why I didnt see 'v2=v3' being returned. My point is, the correct answer involves text that wasnt in the question, as it was hardcoded text, and executing it like you posted it would not return what you set as the right answer.
You must have read my reply while I was editing it - that was pretty fast reaction! I had to go to the newsletter to check the text of the question, because of course once I start looking at comments I can no longer see the text on the website, but that was the only delay after I had realised I needed to check again immediately on hitting th epost button.
Yes, there is indeed a misprint in the answer, and my first reply must have come over as arrogant twaddle until I edited it. :blush:
However, the misprint in the answer doesn't affect anyone's points, because what's in the answer isn't the option you have to select (it isn't even an option) and the correct option is there in the questiopn and you get the points if you select it. There's a matching misprint in the options listed too. :blush: blush: blush:
Tom
November 30, 2011 at 6:22 am
Hugo Kornelis (11/30/2011)
Tom, please double check the question. The SQL text contains the string constant 'v3 = v2' as one of the CASE results. The correct answer option reads v2 = v3. As you can see, the order of the two variable names is reversed.The intention is very clear, but all the people who commented that this is a typo and that the answer is technically incorrect are in fact right.
Yes, you are right Hugo. Fortunately it doesn't affect the result - there's no typo in the question, only in the answer, so people who get it right (pick the right option, not the row incorrectly given as the answer which they can't pick anyway as it's not one of the options) get their points and people who get it wrong don't. I imagine most people who get it right don't look at the row in teh answer and don't notice the misprint, but it's certainly irritating for those who get it wrong (perhaps by picking a random option in order to see the answer) so I'm asking Steve to fix the answer text.
There were two misprints (matching each other) which means that scores were affected.
Tom
November 30, 2011 at 6:27 am
gary.mazzone (11/30/2011)
Since the version is not specified if this is run on SQL Server 2005 then the Answer needs to be None of the above. Why do we ask.... Time is not a valid system type in SQL Server 2005 and is only avail in 2008 and above. Way was that not specified in the QOD?
I guess it should have been. My fault, I should have included the version in the question.
The only excuse I have is that SQL 2008 is pretty old now, even SQL 2008 R2 is not as new as it used to be (and is the only version I now use). But it's not a good excuse, because I skipped direct from 2000 to 20008 didn't use 2005, so I expect there to be people who skip direct from 2005 to 2012 and never use 2008.
Tom
November 30, 2011 at 6:32 am
Not listed as an excuss. I'm in a shop where we have not moved any critcal systems to SQL 2008R2 let alone thinking about 2012. The fact is that the data type is not avail.
Viewing 15 posts - 16 through 30 (of 58 total)
You must be logged in to reply to this topic. Login to reply