August 26, 2001 at 2:14 pm
I just needed a help from you.
The problem that I am facing is that I am not able to use the output variable of sp_A into sp_b.
sp_A:
output variable X,
input variable Y
sp_B:
Line 1: exec sp_A, @x='',@y='anything'
Line 2: insert into tab1(id) values (@x)
i am not able to use @x in line 2 of sp_B.
Please let me know if this is allowed in SQL Server. And if yes, please let me know how do get around this situation.
Thankx
Paras Shah
Evision Technologies
Mumbai, India
August 26, 2001 at 6:21 pm
You need to declare the parameter as output, both in the proc and in the code where you call it. Unless the param is declared as output, the 2nd sp will not get the value you're trying to pass to it.
Andy
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy