soundex() Function

The soundex() function returns the 4-digit soundex code for a phonetic string expression.

Syntax

soundex(str.exp {,code})

Parameter(s)

str.exp

Specifies the phonetic string expression from which the 4-digit soundex code is returned.

code

Provides backward compatibility. Options are:

0

Original census soundex (default).

1

English-language soundex.

Description

The code consists of the first letter of the word, plus values for the next three additional consonants. If there are less than three consonants, 0s are placed in the code. The codes are values given to consonants. Words with a similar arrangement of consonants have similar codes, regardless of the actual spelling. Also, similar sounding consonants can have the same code.

Example(s)

This outputs "P2".

crt soundex("PICK")

See Also

BASIC Functions, Statements and Functions, u00b9 User Exit