views:

25

answers:

1

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()
+6  A: 

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;
Remus Rusanu