SOUNDEX Function

Converts a string into its phonetic equivalent.

Syntax

SOUNDEX(expression)

Syntax Elements

expression is any DataBasic expression. Any nonalphabetic characters in expression are ignored.

Operation

This function converts expression to upper case and then returns the first alphabetic character, followed by a 1- to 3-character phonetic code.

The codes are:

Code

Letters

1

B, F, P, V

2

C, G, J, K, Q, S, X, Z

3

D, T

4

L

5

M, N

6

R

When the SOUNDEX function assigns the phonetic code, it ignores the letters A, E, H, I, O, U, W, and Y and all non-alphabetic characters. Duplicate codes that run consecutively are not repeated.

Comments

You can use the SOUNDEX function to protect against strings not matching due to mispelling. However, do not accept the SOUNDEX conclusions without some confirmation.

Examples

F1 = SOUNDEX("A TEST")
PRINT F1

Prints A323.

A = "LAMINATE"
B = SOUNDEX(A)

B is L53 because the I is ignored and M and N are considered phonetically equivalent.

PRINT SOUNDEX("mmm")

Prints M5.