Sometimes I want to stop execution. Not do a rollback. Just stop execution. These are stored procedures that are either executed individually are several stored procedures included in a single script.
Will the RAISE ERROR work? I tried it without the 'WITH LOG' and it continued execution. But with 'WITH LOG' it stopped during my test. Just not sure about how reliable it is in the field.
RAISERROR ('Message', 20, 1) WITH LOG
also sometimes when i execute the above I get an appropriate 'Message'. other times I get the following. Anyone know what that is about?
"Msg 233, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)"