cagm416
SSC Rookie
Points: 34
More actions
July 23, 2007 at 7:45 pm
#372880
Hello
I have a dynamic script that returns a value, but i don't know how catch the return value...
@sql = select var1 from table1 where sent1
exec (@SQL)
How I can to know the return of this query????
Ninja's_RGR'us
SSC Guru
Points: 294069
July 23, 2007 at 8:09 pm
#721734
Assuming you actually need to use Dynamic sql (because you don't need to in your exemple) :
EXEC sp_executesql @sql, N'@YourVariableHere INT OUTPUT', @YourVariableHere OUTPUT
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply