#### Soundex

##### Soundex(string)

Evaluates a text string and returns a four-character value that symbolizes the way the string sounds. Use this function whenever you want to locate records based on two or more field values that are spelled differently yet sound alike. This function can also be used to find customer names that have been misspelled.

Parameter

String is one of two or more strings that sound alike.

Return value

Text string.

Example

`Soundex("Jinfonet")` - Returns J515.

Notes:

- The value string must be in quotes.
- Soundex works only with values that begin with the same letter. For example, Soundex will return the same value for Chris and Cris C620 but not for Kris K620. Soundex creates a code based on the first character in the string plus three characters based on the following:
  - Non-alpha characters (i.e. numbers and punctuation) become -1.
  - The characters a, e, i, o, u, y, h, and w are ignored (except when they are the first character in the original string).
  - The characters b, f, p, and v become 1.
  - The characters c, g, j, k, q, s, x, and z become 2.
  - The characters d and t become 3.
  - The character l becomes 4.
  - The characters m and n become 5.
  - The character r becomes 6.
- If the resulting code is only 2 or 3 characters long, Soundex uses zeros to fill it out to four characters. For example, in the name Lauren, only the L, r, and n are translated (Lrn), so the resulting Soundex code becomes L650.
- If the resulting code is more than four characters long, all characters after the fourth character will be ignored. For example, in the name Patrick, the P, t, r, c, and k can be translated (Ptrck), but the resulting Soundex code will only be four characters P362.