Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to get back the output parameter from Dynamic query execution

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-25 : 08:36:50
Pete writes "I got this store procedure for
ex.
create proc usp_test (@a int output)
as
select @a = 1

But this store procedure will be call using dynamic query

exec ('pubs.dbo.usp_test @b output')

NOTE: if i run not using dynamic query then I got the output back
pubs.dbo.usp_test @b output

How do I got the output back calling from dynamic SQL.

thanks,"

ToddV
Posting Yak Master

218 Posts

Posted - 2002-03-25 : 09:10:25
Why do you neeed to call this dynamically?

follow nr's post in this to use sp_exececutesql and output parameters.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=12497

Go to Top of Page
   

- Advertisement -