You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns an integer value that indicates the difference between the SOUNDEX values of two character expressions.
32
+
This function returns an integer value measuring the difference between the [SOUNDEX()](./soundex-transact-sql.md) values of two different character expressions.
33
33
34
34
[Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
Is an alphanumeric [expression](../../t-sql/language-elements/expressions-transact-sql.md) of character data. *character_expression* can be a constant, variable, or column.
43
+
*character_expression*
44
+
An alphanumeric [expression](../../t-sql/language-elements/expressions-transact-sql.md) of character data. *character_expression* can be a constant, variable, or column.
45
45
46
46
## Return Types
47
-
**int**
48
-
47
+
**int**
48
+
49
49
## Remarks
50
-
The integer returned is the number of characters in the SOUNDEX values that are the same. The return value ranges from 0 through 4: 0 indicates weak or no similarity, and 4 indicates strong similarity or the same values.
50
+
`DIFFERENCE` compares two different `SOUNDEX` values, and returns an integer value. This value measures the degree that the `SOUNDEX` values match, on a scale of 0 to 4. A value of 0 indicates weak or no similarity between the SOUNDEX values; 4 indicates strongly similar, or even identically matching, SOUNDEX values.
51
51
52
-
DIFFERENCE and SOUNDEX are collation sensitive.
52
+
`DIFFERENCE` and `SOUNDEX` have collation sensitivity.
53
53
54
54
## Examples
55
-
In the first part of the following example, the `SOUNDEX` values of two very similar strings are compared. For a Latin1_General collation `DIFFERENCE` returns a value of `4`. In the second part of the following example, the `SOUNDEX` values for two very different strings are compared, and for a Latin1_General collation `DIFFERENCE` returns a value of `0`.
55
+
The first part of this example compares the `SOUNDEX` values of two very similar strings. For a Latin1_General collation,`DIFFERENCE` returns a value of `4`. The second part of the example compares the `SOUNDEX` values for two very different strings, and for a Latin1_General collation,`DIFFERENCE` returns a value of `0`.
56
56
57
57
```
58
58
-- Returns a DIFFERENCE value of 4, the least possible difference.
0 commit comments