Soundex Function

Generates codes that can be used to compare character strings based on how they sound.

Syntax

Soundex (string)

string is the string to be analyzed. Only the alphabetic characters in string are considered. If string is a null value, null is returned.

Remarks

The Soundex function returns a phonetic code consisting of the first letter of the string followed by a number. Words that sound similar, for example fare and fair, generate the same phonetic code.

Example

The following examples show the Soundex values for various strings:

MySnd = Soundex("Greenwood") ;* returns "G653"
MySnd = Soundex("Greenwod")  ;* returns "G653"
MySnd = Soundex("Green")     ;* returns "G650"
MySnd = Soundex("")          ;* returns ""