Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,657 of 19,505    |
|    Erland Sommarskog to Gene Wirchenko    |
|    Re: When to Use GO    |
|    31 May 12 07:29:17    |
      XPost: microsoft.public.sqlserver.programming       From: esquel@sommarskog.se              Gene Wirchenko (genew@ocis.net) writes:       > I have a script where I very early delete the database and       > recreate it. In one recent problem area, I create a procedure. It       > has a GO in front of it, because stored procedures have to be first in       > a batch. Fine. If I then follow with a CREATE TABLE in the same       > batch,              You can't. That CREATE TABLE is part of the procedure. CREATE PROCEDURE must       be the first command in the batch, and it is the only command in the batch,       a property it shares with a couple of more commands.              Again, put your source code under version-control and load the files from       a client-side program. Then you don't need to ask these questions.                     --       Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se              Books Online for SQL Server 2005 at       http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx       Books Online for SQL Server 2000 at       http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca