|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
return a Scalar value...How can I return a Scalar value by calling PROCEDURE 2 from PROCEDURE 1.
Something Like: SET @nextDataVersion = EXEC(pr_GetNextDataVersion 2) (this does not work!) different EXEC (you're using the dynamic sql one)
should be: EXEC @nextDataVersion = pr_GetNextDataVersion 2 Note: This return value must be an int. [see RETURN in BOL for more] Evan Camilleri wrote: Show quote > How can I return a Scalar value by calling PROCEDURE 2 from PROCEDURE 1. > > Something Like: > SET @nextDataVersion = EXEC(pr_GetNextDataVersion 2) > > (this does not work!) > > Thanks! Quite stange syntax!
Show quote "Trey Walpole" <treypole@newsgroups.nospam> wrote in message news:eVcKKWq9FHA.3880@TK2MSFTNGP12.phx.gbl... > different EXEC (you're using the dynamic sql one) > > should be: > EXEC @nextDataVersion = pr_GetNextDataVersion 2 > > Note: This return value must be an int. [see RETURN in BOL for more] > > Evan Camilleri wrote: >> How can I return a Scalar value by calling PROCEDURE 2 from PROCEDURE 1. >> >> Something Like: >> SET @nextDataVersion = EXEC(pr_GetNextDataVersion 2) >> >> (this does not work!) >> |
|||||||||||||||||||||||