I have a stored procedure where it ends with a RETURN value of 0 or 1.
I want to use this value in an IF statement in another stored procedure.
How can I get the return value of a previous stored procedure and store it in a variable in the last?
I could not find anything related. All questions relate to getting RETURN values โโin C #.
I was thinking maybe something like this:
SP_Two
DECLARE @returnValue INT SET @returnValue = EXEC SP_One IF @returnValue = 1 BEGIN --do something END ELSE BEGIN --do something else END
sql sql-server
hermann Nov 28 '12 at 12:35 2012-11-28 12:35
source share