Mensaje
 
a
11/06/2008 14:34:54
Jay Johengen
Altamahaw-Ossipee, Carolina del Norte, United States
General information
Foro:
Microsoft SQL Server
Category:
Scripting
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
ID de la conversación:
01323190
ID del mensaje:
01323220
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
>>>I want to end the script at some point so the code after it does not run. I would just use CANCEL or RETURN in Forpro.
>>
>>Put GO statement to separate scripts from one another. It doesn't stop it, though, so you can use RETURN command.
>
>If GO doesn't stop the script, what does it do?

GO is a batch separator and should be used ONLY in query window. You can't have GO inside Stored procedure or in script you sent from your FronEnd.
I'm not sure what you need here. If you want to execute only several lines from your script in query window just mark them and then execute selection. In other cases you have to put some error handling or additional logic to skip execution. If this is a SP you can have RETURN everywhere you need and that will stop execution of the lines follow that RETURN.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Responder
Mapa
Ver