July 30, 2010 at 1:06 pm
I had the same question and after pouring thru posts here and on the web, found the solution in BOL (of course) under the "Returning Data by Using OUTPUT Parameters ". I wanted a string returned, here's an example:
DECLARE @someVar varchar(max)
EXEC usp_YourStoredProc @someVar OUTPUT
PRINT @someVar
For you, as it looks like you're just returning an INT, you can use the RETURN statement in your original stored procedure (again, check out BOL).
HTH
----------------------------------------------------------------------------
Sacramento SQL Server users group - http://sac.sqlpass.org
Follow me on Twitter - @SQLDCH
----------------------------------------------------------------------------
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply