SOUNDEX Function
Syntax
Arguments
- character
The character string to process.
Description
Returns the soundex value of a string.
Discussion
Returns a 4-character code in a string that represents the phonetic equivalent of the supplied character input string. Use SOUNDEX() to determine if one string "sounds like" another. You typically use SOUNDEX() in index expressions and filter expressions to search for records when you are not sure of the correct spelling of the value you want to find. SOUNDEX() enables you to search for records that sound like a particular value. NOTE You must specify the correct first character in the string in order for SOUNDEX() searches to work.
Example
soundex("wiseman") -> W255 soundex("wizemann") -> W255 soundex("WISEMAN") -> W255 (i.e., SOUNDEX is not case sensitive)
Assume that you have indexed an employee table using the following index expression:
soundex(LASTNAME)
To find "Schoenfeld", select the Find command and enter "shonefelt" at the prompt. Alpha Anywhere finds the first record that sounds like "Schoenfelt". NOTE When you use the Find command with an index that is constructed using SOUNDEX, Alpha Anywhere automatically converts the string you want to find to a Soundex value before performing the find. To find all of the employees named "Schoenfeld" who work in Boston, enter the following filter expression:
soundex(LASTNAME) = soundex("shonefelt") .and. trim(CITY) = "Boston"
See Also