Home All Groups Group Topic Archive Search About

return a Scalar value...

Author
1 Dec 2005 6:24 PM
Evan Camilleri
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!)

Author
1 Dec 2005 6:35 PM
Trey Walpole
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!)
>
>
Author
1 Dec 2005 6:40 PM
Evan Camilleri
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!)
>>

AddThis Social Bookmark Button