We have a SP that returns one column from one row. It is called from within another SP via EXEC. I am trying to assign the returned value to a variable, but the variable is always 0 (default for type).
exec @myVar = usp_my_sp @p1, @p2
A different table needs to be updated with the returned value. Any thoughts on how to get that value back, in a form that can then be used in an UPDATE statement?
By the way, the first SP uses dynamic SQL and EXEC (don't ask), so a nice, simple join is not available.
Thanks
exec @myVar = usp_my_sp @p1, @p2
A different table needs to be updated with the returned value. Any thoughts on how to get that value back, in a form that can then be used in an UPDATE statement?
By the way, the first SP uses dynamic SQL and EXEC (don't ask), so a nice, simple join is not available.
Thanks