There was a similar case for this last month,but I'm not having any luck.
I've dumbed down the query to the point where it doesn't have any parameters passed on workflows end by including it in the query:
USE [Database] GO DECLARE @return_value int EXEC @return_value = [dbo].[lf_case_lock_retrieve] @casenum = N'11-22222', @userid = N'laserfiche' SELECT 'Return Value' = @return_value GO
When I run this on sql server manager, I'm getting results.
When I run this as a custom query in workflow and try to test, I'm getting "Incorrect syntax near GO twice.