开发者

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

开发者 https://www.devze.com 2023-01-10 20:57 出处:网络
Trying to put a function call that returns an int into a call for a stored procedure. Getting \"Incorrect syntax near \'.\'.\"

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

精彩评论

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