Wednesday, March 28, 2012

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:
> 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!
"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:

No comments:

Post a Comment