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
The accepted answer is invalid with the double EXEC (only need the first EXEC):
DECLARE @returnvalue int; EXEC @returnvalue = SP_SomeProc PRINT @returnvalue
And you still need to call PRINT (at least in Visual Studio).