Calling a Stored Procedure and printing its output

Question:

I have a stored procedure with the following declaration:

ALTER procedure [dbo].[SPR_SVYGetNextSurveyID]
@order_ID                  int,
@Return_Survey_ID      int output

I need to call that stored procedure and print out its return value.

Can someone show me the syntax to do that.

My attempt is below:

declare
@sid int
exec SPR_SVYGetNextSurveyID 5466799, @sid out
print @sid

Solution:

that seems to be correct

digg delicious stumbleupon technorati Google live facebook Sphinn Mixx newsvine reddit yahoomyweb
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...