可能重复一个用户定义的标量函数:
Cast integer and concatenate to varchar in TSQL呼叫内的执行语句
我已经创建了两个标量函数,每个返回uniqueidentifer
类型。我需要在执行语句中调用这些过程,但我似乎有语法错误。
Exec spModifyProductPropertyValue
@PAVID,
fnGetPropertyIDbyLabel(@Label7, @USPID, 0, 1),
@ProductID,
@Value7,
fnGetPINID(@7PIN),
0,
@counter out
我注意到那是什么,当我单独调用的函数,然后通过使用来自theprevious调用的输出上面的号召,像这样
Declare
@PropertyID as uniqueidentifier = null
Select @PropertyID = fnGetPropertyIDbyLabel(@Label7, @USPID, 0, 1)
Exec spModifyProductPropertyValue
@PAVID,
@PropertyID,
@ProductID,
@Value7,
fnGetPINID(@7PIN),
0,
@counter out
编译器不会抱怨太多。这种方法的问题是我最终创建了很多这些临时变量(差不多50),这是我想尽量避免的。我希望得到这个正确的任何帮助,请。
阅读此:http://stackoverflow.com/questions/5967035/using-function-as-a-parameter-when-executing-a-stored-procedure。这是不可能的。 – prashanth