[dba-SQLServer] Multiple Updates In One Stored Procedure

Francisco Tapia fhtapia at gmail.com
Mon Jun 20 10:22:02 CDT 2005


Typically you wouldn't use the "GO" keyword in a stored procedure, instead 
you'd use the RETURN keyword when you completed the set of transactions you 
intended.

On 6/20/05, Paul Hartland <Paul.Hartland at orridge.co.uk> wrote:
> 
> The true reason I ask is because I am passing the procedure two
> parameters, and after the first GO keyword it loses the parameters, but
> when I tried with just GO at the very end it worked fine. Yet in many
> examples I have seen they have had GO after each Update/Insert
> 
> 
> PAUL HARTLAND
> Database Designer/Programmer
> paul.hartland at isharp.co.uk
> ISHARP
> DDI - 01922 472031
> Mobile - 07730 523179
> 
> 
> 
> ISHARP (Information Services for Hospitality, Audit, Retail and
> Pharmacy) provide IT resources for the Christie Group Stock & Inventory
> Services companies.
> 
> 
> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of
> Francisco Tapia
> Sent: 17 June 2005 17:29
> To: dba-sqlserver at databaseadvisors.com
> Subject: Re: [dba-SQLServer] Multiple Updates In One Stored Procedure
> 
> I think Paul asks, because in BOL you find a lot of examples w/ the GO
> keyword aftwards... I think it would help him a lot if he picked up a
> good Stored Procedures book. Altho BOL do seem very through.
> 
> http://www.amazon.com/exec/obidos/tg/detail/-/0072228962/qid=1117667473/
> sr=8-1/ref=sr_8_xs_ap_i1_xgl14/002-8508889-5196029?v=glance&s=books&n=50
> 7846
> 
> 
> 
> On 6/17/05, Jim Lawrence <accessd at shaw.ca> wrote:
> >
> > Hi Paul:
> >
> > There is ways in many cases ways around using the 'GO' but it is a
> > good way to separate the sections. This seems like an odd question.(?)
> >
> > -----Original Message-----
> > From: dba-sqlserver-bounces at databaseadvisors.com
> > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Paul
> > Hartland
> > Sent: Friday, June 17, 2005 1:35 AM
> > To: dba-sqlserver at databaseadvisors.com
> > Subject: [dba-SQLServer] Multiple Updates In One Stored Procedure
> >
> > To all,
> >
> > If I want to create a Stored Procedure that updates multiple tables,
> > do I have to have the word GO after each update section ?
> >
> > Thanks in advance for any help..
> >
> 



-- 
-Francisco
http://pcthis.blogspot.com |PC news with out the jargon!
http://sqlthis.blogspot.com | Tsql and More...



More information about the dba-SQLServer mailing list