DIFFERENCE Function

Syntax

Integer_Result as N = DIFFERENCE(C string_1,C string_2)

Arguments

string_1

A character string.

string_2

A character string.

Description

Returns a value showing the difference in the soundex values for two strings.

Discussion

DIFFERENCE() returns an integer ranging from 0 to 4, which represents the difference between the Soundex values for String1 and String2. If the character strings are close, the function returns 4; if the strings have no letters in common, the function returns 0.

Example

difference(LASTNAME,"GUYERSKI") -> 0, for all LASTNAMES whose SOUNDEX values have no relation to the SOUNDEX value of "GUYERSKI".
difference(LASTNAME,"GUYERSKI") -> 3, for all LASTNAMES whose SOUNDEX values are almost equal to the SOUNDEX value of "GUYERSKI".
difference(LASTNAME,"GUYERSKI") -> 4, for all LASTNAMES whose SOUNDEX values are equal to the SOUNDEX value of "GUYERSKI".

See Also