Re: STORED PROCEDURE IF STATEMENT
From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 07/21/04
- Next message: Nikhil Patel: "Re: Adding text string to TEXT data type ??"
- Previous message: Narayana Vyas Kondreddi: "Re: a rookie question about sp_helptext"
- In reply to: Stephen: "STORED PROCEDURE IF STATEMENT"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Jul 2004 09:13:17 -0400
I'd just like to stress a point from Roji's comment: @@ERROR will only look
at errors from a statement that IMMEDIATELY precedes it. Putting this at
the bottom of a sproc will have little (or no) benefit if there is more than
one statement executed in the sproc.
Is the client actually checking for return values?
"Stephen" <Stephen@discussions.microsoft.com> wrote in message
news:002A1C52-1559-4574-9774-7F1DFD5AAD98@microsoft.com...
> Im recently started using stored procedures and have inherited many for a
project im taking part in. I'm having difficulty working out all of the
statements tho. Could someone please tell me what the following means when
it is placed at the bottom of a stored procedure.
>
> IF @@ERROR = 0
> RETURN 1
> ELSE
> RETURN 0
>
> Im not a programmer and so am a little confused as to exactly what this is
doing.
- Next message: Nikhil Patel: "Re: Adding text string to TEXT data type ??"
- Previous message: Narayana Vyas Kondreddi: "Re: a rookie question about sp_helptext"
- In reply to: Stephen: "STORED PROCEDURE IF STATEMENT"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|