DataBasic Reference > Statements and Intrinsic Functions > S > SOUNDEX Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

SOUNDEX Function (DataBasic) (m618703+soundex_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

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.

RealityV15.1 (MoTW) Revision 7Comment on this topic