SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


GO Part 2


GO Part 2

Author
Message
lanre_makinde
lanre_makinde
SSC-Enthusiastic
SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)SSC-Enthusiastic (128 reputation)

Group: General Forum Members
Points: 128 Visits: 134
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....
Hugo Kornelis
Hugo Kornelis
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34305 Visits: 13112
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?


Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Tom Thomson
Tom Thomson
SSC Guru
SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)

Group: General Forum Members
Points: 50569 Visits: 13157
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

Miles Neale
Miles Neale
SSCertifiable
SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)

Group: General Forum Members
Points: 6619 Visits: 1698
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 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!
Kenneth Fisher
Kenneth Fisher
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12353 Visits: 2121
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 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 Fisher
I 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/For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/Link to my Blog Post --> www.SQLStudies.com
Anurag-428305
Anurag-428305
Old Hand
Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)Old Hand (307 reputation)

Group: General Forum Members
Points: 307 Visits: 183
What a Nonsense this question is?Hehe
(Bob Brown)
(Bob Brown)
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1419 Visits: 1145
Anurag-428305 (9/20/2012)
What a Nonsense this question is?Hehe


I'm not sure why they made "GO" a configurable batch separator. I'm sure they had a reason that is beyond me but the question is not nonsense in the fact it was something I never knew and even thought about but am aware of now due to this question.
Jamie-2229
Jamie-2229
SSCertifiable
SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)SSCertifiable (5.6K reputation)

Group: General Forum Members
Points: 5555 Visits: 862
Was it mentioned how one would change the separator?

Jamie
SQL-DBA-01
SQL-DBA-01
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19017 Visits: 3813
The question was not clear at all...at a surface while using 'notgo', the entire script should prone to a failure..

Thanks.
Kenneth Fisher
Kenneth Fisher
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12353 Visits: 2121
SQL-DBA-01 (10/8/2012)
The question was not clear at all...at a surface while using 'notgo', the entire script should prone to a failure..


Please read the explanation and the previous 79 posts. That should explain it quite thoroughly. If not please post again and I'll try to explain it in a different way.

Kenneth Fisher
I 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/For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/Link to my Blog Post --> www.SQLStudies.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search