Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

SET Options - 2 Expand / Collapse
Author
Message
Posted Tuesday, December 4, 2012 8:22 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, December 12, 2014 3:32 AM
Points: 1,639, Visits: 5,721
bitbucket-25253 (12/4/2012)
3. I can only guess, but was using a brand new lap top when submitting the question and typing the QOD rather than a cut and paste from SSMS, and somehow or other I pressed the semi-colon key.


Are programmers (including the ones who write SQL code) the only people who think retyping something is less hassle than cut and paste, I wonder?
Post #1392531
Posted Tuesday, December 4, 2012 8:27 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: 2 days ago @ 8:20 AM
Points: 1,490, Visits: 1,060
Hugo Kornelis (12/4/2012)
I picked the wrong option. If I had checked the submitter of the question, I probably would have picked the right option - I don't think I ever saw an intentional trick question from Ron.


I did see Ron was the submitter and I still picked the wrong option. I thought to myself, "It's not like him to write an intentional trick question but it's not like him to create a blatent typo either." Other than this snag, I liked the question.
Post #1392534
Posted Tuesday, December 4, 2012 9:03 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Friday, October 24, 2014 12:43 PM
Points: 4,126, Visits: 3,428
Hugo Kornelis (12/4/2012)
I had to make a guess as to the author's intention and preparation.

Did he actually try the code himself? In that case, it is a nasty trick question, because everything in the question distracts from the syntax error (semicolon after GO) that causes the batch to fail and the table to not be created. . . .

I did not expect a trick question from Ron and the rest was easy.

Thanks, Ron.
Post #1392561
Posted Tuesday, December 4, 2012 10:13 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, December 18, 2014 11:55 AM
Points: 3,806, Visits: 1,235
I picked the right answer because I did think the semicolon was a typo from Ron.

Great question about options, but keep in mind that naming DB objects with reserved words is not a good practice.
Saludos,


"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan

To better understand your help request, please follow these best practices.
Post #1392602
Posted Tuesday, December 4, 2012 10:27 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:42 AM
Points: 3,688, Visits: 72,435
I get this if I run the script.

Msg 102, Level 15, State 1, Line 8
Incorrect syntax near 'GO'.

If I remove the semi-colon from the GO, it works.





--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #1392614
Posted Tuesday, December 4, 2012 10:31 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, September 30, 2014 7:42 AM
Points: 3,688, Visits: 72,435
mtassin (12/4/2012)
I get this if I run the script.

Msg 102, Level 15, State 1, Line 8
Incorrect syntax near 'GO'.

If I remove the semi-colon from the GO, it works.



BLAH! Why can't I ever read question writers minds?

Too often the surprise questions leave me sitting there going... did he mean for the ; to throw the error or not.

Obviously now it's that he didn't mean for that. Of course I had to guess which way his devious mind was going.

Steve should at least fix the question for the later comers.




--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #1392616
Posted Tuesday, December 4, 2012 10:36 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, June 12, 2014 4:19 AM
Points: 701, Visits: 1,145

BLAH! Why can't I ever read question writers minds?

Too often the surprise questions leave me sitting there going... did he mean for the ; to throw the error or not.

Obviously now it's that he didn't mean for that. Of course I had to guess which way his devious mind was going.

Steve should at least fix the question for the later comers.


Sad to have to ferret out the syntax typos and get to question the author meant. Sometimes the syntax errros are the question and sometimes not?? And I'm a bad guesser.
Post #1392618
Posted Tuesday, December 4, 2012 12:39 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, January 16, 2013 10:02 AM
Points: 148, Visits: 70
ma-516002 (12/4/2012)
Got it wrong, because I thought it is a trick question since "GO;" will throw an error and the table will not be created.


Agreed. If the SQL is executed with the semi-colon an error will be thrown and the table will not be created.
Post #1392662
Posted Tuesday, December 4, 2012 1:51 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Thursday, December 18, 2014 12:52 PM
Points: 13,636, Visits: 11,509
Great question Ron, thanks!



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1392687
Posted Tuesday, December 4, 2012 7:24 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: 2 days ago @ 3:20 PM
Points: 18,064, Visits: 16,099
Thanks Ron.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #1392766
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse