开发者

How do I pass a UDF scalar function into a stored procedure?

Trying to put a function call that returns an int into a call for a stored procedure.

Getting "Incorrect syntax near '.'."

usp_Document_ReserveForGrader '98832750-142F-4623-91F7-6E43C6F1A963',
开发者_运维问答12,dbo.Workflow_FirstProgress()


You need to assign the result of the UDF to a variable and pass the variable to the PS:

declare @x int;
set @x = dbo.Workflow_FirstProgress();
exec usp_Document_ReserveForGrader '98832750-142F-4623-91F7-6E43C6F1A963', 12,@x;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜