I have a function that works like this: select score from comparestrings(@String1,@string2)
I need to compare every row in a table(@string2) to @string1. Is it possible without While loop and a cursor?
My function came from simmetrics library
The code of function is below:
ALTER FUNCTION
[dbo].[BlockDistance](@firstword [nvarchar](255), @secondword [nvarchar](255))
RETURNS [float] WITH EXECUTE AS CALLER
AS
EXTERNAL NAME [TextFunctions].[StringMetrics].[BlockDistance]
Is comparestrings a UDF that returns a table?
Instead, just make it return a
scalar valueand do this: