|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Yesterday @ 12:30 PM
Points: 397,
Visits: 314
|
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:42 PM
Points: 877,
Visits: 1,158
|
|
Nice command. Thanks
Thanks
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Monday, May 16, 2011 8:22 AM
Points: 378,
Visits: 353
|
|
Ha! I never knew one could do that with GO. Thanks!
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Saturday, March 16, 2013 9:53 AM
Points: 847,
Visits: 768
|
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Yesterday @ 6:54 AM
Points: 9,364,
Visits: 6,462
|
|
I like the point the question tried to make, namely using the GO statement as an instrument to loop, but I do not like the trickery with the # name. At first, I did not even notice the GO 100 statement, as I was focusing on the table name. So I'm confused what this question actually tried to do: teach us about GO n (mission accomplished), or about the various options for table names or was it just to trick people into choosing the wrong answer?
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
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, January 23, 2013 5:36 AM
Points: 51,
Visits: 71
|
|
| Nice information, thanks..
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Wednesday, September 21, 2011 4:03 AM
Points: 713,
Visits: 100
|
|
Good Question to ask !!!
-------------------------------------------------------------------------------- Mayank Parmar Software Engineer Clarion Technologies SEI CMMI Level 3 Company 8th Floor, 803, GNFC info Tower, SG Highway, Ahmedabad - 380 054, Gujarat, India. www.clariontechnologies.co.in Email: mayank.parmar@clariontechnologies.co.in MSN : mayank.parmar@clariontechnologies.co.in Mobile: +91 9727748789 --------------------------------------------------------------------------------
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 3:14 AM
Points: 1,160,
Visits: 726
|
|
da-zero (11/23/2010) I like the point the question tried to make, namely using the GO statement as an instrument to loop, but I do not like the trickery with the # name. At first, I did not even notice the GO 100 statement, as I was focusing on the table name. So I'm confused what this question actually tried to do: teach us about GO n (mission accomplished), or about the various options for table names or was it just to trick people into choosing the wrong answer?
Yeah, I fell down on this one as well... however, when I did actually try to run the code it didn't seem to like the "100"... I got...
(1 row(s) affected)
Server: Msg 170, Level 15, State 1, Line 3 Line 3: Incorrect syntax near '100'.
The code is identical... I'm running this on a SQL Server 2000 box, but I don't think that matters...
_____________________________________________________________________ "The difficult tasks we do immediately, the impossible takes a little longer"
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 2:42 PM
Points: 877,
Visits: 1,158
|
|
Try
INSERT INTO # SELECT 'ASDF' GO 0 GO <ZERO> --- SQL doesn't throw any complilation error but when you execute the code, status bar should display: "Query completed with errors".
Thanks
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: 2 days ago @ 8:45 AM
Points: 969,
Visits: 649
|
|
|
|
|