September 14, 2012 at 2:48 pm
Artur Komkov (9/14/2012)
My first impression about this question was very negative.Question itself is not clear and right answer is definitely "false". It is a disaster to have an interview with somebody who would ask similar questions 🙂
Discussion is much more useful. I got a lot useful information about things which were outside of my daily routine.
Artur
Actually the correct answer is True. By changing the batch separator from GO to NOTGO the script will work exactly as delivered.
The only criticism that I have had on the question so far was my choice of answers True/False instead of Yes/No and I've agreed with that. What other criticisms do you have? I do truly want to know as I plan on doing more questions/writing and would like to improve my skills.
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
September 14, 2012 at 2:50 pm
How can you say the correct answer is false when you can run that exact script without modifying the SCRIPT? I agree with the poor wording of the question but the point of the question is easy to understand if you aren't picky with the wording.
September 15, 2012 at 6:13 am
Good question about something most people are lucky enough not to have encountered.
But the wording is terrible - Making the question fit the answer options forces one to assume what was meant; maybe most people will make the right assumption, but not everybody here has fully fluent English, For a speaker of Scots Gaelic, Irish, or Manx (and I think Cornish, Breton, or Welsh too but I'm not certain of those) the simplest way of changing a question like this that requires a yes/no answer to a statement that can be true or false (assuming that the mismatch is just a careless error to be fixed by the smallest ossible change) is to change from an interrogative particle to a negational particle, so if the correct answer to this question is "yes" the correct description of the statement derived from it is "false". Of course it's possible to get the same change as the one which seems natural in English, and have "true" mach "yes"; but in Goidelic languages (and probably also in Brithonic languages) that requires dropping the negational particle and changing the verb from dependent mode to independent mode, which is about twice as much change of the one which would match "true" with "no". There are probably plenty of other languages where the same sort of consideration would apply. I didn't find it difficult, but I did actually think about it for a while before I convinced myself that "true" meant "yes" here, rather than "no".
So I'm sure that the wording will confuse a lot of people whose first language is not English.
Tom
September 17, 2012 at 2:13 am
Nice question thanks!
:exclamation: "Be brave. Take risks. Nothing can substitute experience." :exclamation:
September 17, 2012 at 2:49 pm
If we run With Notgo Statement i thing in that case Answer Will be true, but if you see the Condition ' Don't Change'
i thing on that side the answer will be False.
September 17, 2012 at 2:56 pm
asifkareem (9/17/2012)
If we run With Notgo Statement i thing in that case Answer Will be true, but if you see the Condition ' Don't Change'i thing on that side the answer will be False.
If you look it only said no changes to the script. Changing the batch separator to NOTGO is a settings change that can be found in your query options. Making this change will let you run the script as written with no errors.
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
September 19, 2012 at 3:17 am
Ha! Good question, I didn't know that a batch separator is not truly part of T-SQL!:blush:
September 19, 2012 at 9:46 am
Sorry i disagree with the answer, unless there is an explanation for "NotGo"
September 19, 2012 at 10:10 am
lanre_makinde (9/19/2012)
Sorry i disagree with the answer, unless there is an explanation for "NotGo"
Read the 67 posts above yours. The explanation has already been given multoiple times.
Or you could read the explanation that showed up on your screen after you submitted your reply. In case you want to check again, you can find it here[/url].
September 19, 2012 at 10:11 am
lanre_makinde (9/19/2012)
Sorry i disagree with the answer, unless there is an explanation for "NotGo"
You can read the discussion or the answer explination but here is a quick go at it. GO is not really t-sql. It's a batch seperator that can be configured in SSMS. If you change the configuration for your query window from using GO to NOTGO as the batch seperator then the script will work without error.
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
September 19, 2012 at 11:06 am
Sorry the explanation is wrong. Then the question is not properly framed. Questions should be aimed at eliciting understanding....
Even if go is not a standard tsql, then by default i will not add it cos this will depend on my environment.....It does not add to knowledge...no use asking trick questions....
September 19, 2012 at 11:13 am
lanre_makinde (9/19/2012)
Sorry the explanation is wrong. Then the question is not properly framed. Questions should be aimed at eliciting understanding....Even if go is not a standard tsql, then by default i will not add it cos this will depend on my environment.....It does not add to knowledge...no use asking trick questions....
Maybe you can explain why you think the explanation is wrong? I am very pleased with the explanation - it not only tells you why the correct answer is correct, it also gives you some backgrounds, and a warning. I think it's very well done, so I am looking forward to an explanation of why you feel so different about it.
Also, can you explain why the question is, in your opinion, not properly framed? Is that refering to the yes/no vs true/false debate, or is there something else that should have been different?
September 19, 2012 at 4:51 pm
lanre_makinde (9/19/2012)
Sorry the explanation is wrong. Then the question is not properly framed. Questions should be aimed at eliciting understanding....
It appears to me to be right, to be properly framed (at least for fluent English speakers - for others the distinction between yes/no and true/false may be important), and to be very clearly aimed at eliciting understanding.
Can you explain why you reach the opposite conculsion on each of these three points?
Tom
September 19, 2012 at 5:18 pm
joe.wolfe (9/13/2012)
The given answer to this question is "true", but I am not sure this is correct. The "NotGo" throws an error "Incorrect syntax near 'NotGo'" and the variable @test-2 cannot be declared twice the same procedure or batch...What am I missing?
I felt the same way about this question. But knowing that you can configure things as suggested is a great thing to know about and avoid. Worth learning and even missing the answer to know.
Not all gray hairs are Dinosaurs!
September 19, 2012 at 9:22 pm
Miles Neale (9/19/2012)
joe.wolfe (9/13/2012)
The given answer to this question is "true", but I am not sure this is correct. The "NotGo" throws an error "Incorrect syntax near 'NotGo'" and the variable @test-2 cannot be declared twice the same procedure or batch...What am I missing?I felt the same way about this question. But knowing that you can configure things as suggested is a great thing to know about and avoid. Worth learning and even missing the answer to know.
It may be worth mentioning (and honestly I'm not sure I haven't already as long as this discussion as gotten) that the first time I encountered this was when I received a script from a vendor using a non standard batch separator. I had to struggle to figure out what was wrong. My original purpose for this question was to help show others what can be done. Not so that they can use it, since honestly I don't think they should, but so if someone else makes use of this functionality they can easily work around it.
And lets be honest, I find it a rather interesting piece of SQL trivia.
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
Viewing 15 posts - 61 through 75 (of 82 total)
You must be logged in to reply to this topic. Login to reply