Possible Duplicate:
Cast integer and concatenate to varchar in TSQL
I have created two scalar functions that each return uniqueidentifer
types. I need to call these procedures in an execute statement but I seem to have syntax wrong.
Exec spModifyProductPropertyValue
@PAVID,
fnGetPropertyIDbyLabel(@Label7, @USPID, 0, 1),
@ProductID,
@Value7,
fnGetPINID(@7PIN),
0,
@counter out
What I notice is that when I call the function separately and then pass use the output from theprevious call in the call above, like so
Declare
@PropertyID as uniqueidentifier = null
Select @PropertyID = fnGetPropertyIDbyLabel(@Label7, @USPID, 0, 1)
Exec spModifyProductPropertyValue
@PAVID,
@PropertyID,
@ProductID,
@Value7,
fnGetPINID(@7PIN),
0,
@counter out
The compiler does not complain much. Problem with this approach is that I end up creating so many of these temp variables(almost 50), something I want to try to avoid. I would appreciate any help in getting this correct please.