DIFFERENCE() is a wrapper around two SOUNDEX(). : DIFFERENCE « String Functions « SQL Server / T-SQL Tutorial






It simplifies the comparison, reducing the result to a scale from 0 to 4, where the value 4 indicates a very close or exact match.

4>
5> SELECT DIFFERENCE('To', 'Two')
6> GO

-----------
          4

(1 rows affected)








12.4.DIFFERENCE
12.4.1.DIFFERENCE function returns a value between 0 and 4 that reflects how close a match there is between the two strings.
12.4.2.Using String Functions to Search for Phonetically Similar Data
12.4.3.DIFFERENCE() is a wrapper around two SOUNDEX().
12.4.4.SELECT DIFFERENCE ('Redmond', 'Renton')
12.4.5.Use SOUNDEX(au_lname) and DIFFERENCE
12.4.6.DIFFERENCE('Nite', 'Knight')
12.4.7.Use DIFFERENCE in where clause