Viewing 3 posts - 1 through 3 (of 3 total)
I was getting the same error, but strangely, all I did was add DISTINCT to my query and it worked. I'm not going to research why, but that might...
April 9, 2015 at 3:07 pm
#1790016
You can, however, assign an output variable using sp_executesql, but you can't use sp_executesql in a function. 🙂
May 14, 2011 at 10:12 am
#1324632
Using EXEC is easier, but you can't hold the result of EXEC in a variable. This is a no-no:
set @result = EXEC('SELECT 4+5*6-3' )
The submitted function will...
May 14, 2011 at 10:02 am
#1324631