DIFFERENCE('Nite', 'Knight') : DIFFERENCE « String Functions « SQL Server / T-SQL Tutorial






5> SELECT
6> "SX_KNIGHT"=SOUNDEX('Knight'),
7> "SX_NITE"=SOUNDEX('Nite'),
8> "DIFFERENCE"=DIFFERENCE('Nite', 'Knight')
9> GO
SX_KNIGHT SX_NITE DIFFERENCE
--------- ------- -----------
K523      N300              1

(1 rows affected)
1>








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