SOUNDSLIKE(name, sounds_like_name)
Character. The first string in the comparison.
Character. The second string in the comparison.
Logical. Returns T (true) if the parameter values phonetically match, and F (false) otherwise.
You can use this function to find values that sound similar. Phonetic similarity is one way of locating possible duplicate values, or inconsistent spelling in manually entered data.
The function first converts the parameter values to four-character American Soundex codes, which are based on the first letter, and the first three consonants after the first letter, in each parameter value. The function then compares each parameter value’s code and returns a logical value indicating whether they match. For more information about soundex codes, see SOUNDEX( ) function. The function is not case-sensitive, so “SMITH” is equivalent to “smith.”
The SOUNDEX( ) function provides an alternative method for phonetically comparing strings. Both the SOUNDSLIKE( ) and SOUNDEX( ) functions have certain limitations:
The soundex algorithm is designed to work with words pronounced in English, and has varying degrees of effectiveness when used with other languages.
Although the soundex process performs a phonetic match, matching words must all begin with the same letter, which means that some words that sound the same are not matched. For example, a word that begins with an ‘F’ and a word that begins with a ‘Ph’ could sound the same but they will never be matched.
The FUZZYDUP command, and the ISFUZZYDUP( ) and LEVDIST( ) functions, provide a method for comparing strings based on an orthographic comparison (spelling) rather than on a phonetic comparison (sound).
Example | Return value |
---|---|
SOUNDSLIKE("Fairdale","Faredale") |
T “Fairdale” and “Faredale” both have a soundex code of F634. |
SOUNDSLIKE("Jonson","Jonston") |
F “Jonson” has a soundex code of J525, and “Jonston” has a soundex code of J523. |
SOUNDSLIKE(Surname,"Smith") |
A logical value (T or F) indicating whether the soundex code for each value in the “Surname” field matches the soundex code for the string “Smith”. |
To create a filter that isolates all values in the “Surname” field that sound like “Smith”, specify:
SOUNDSLIKE(Surname,"Smith")