Omnidex SQL Function: $SOUNDEX


Returns the Soundex equivalent to a character string (“string” may be a CHARACTER or STRING column, or a string literal). The algorithm used by this function is identical to that applied to keywords in MDK index using the ;SX option. The routine only pays attention to the first 24 characters of the input; the return value is STRING length 25.

Note that the $SOUNDEX function does not parse fields, and therefore returns the Soundex equivalent of the entire string. For example, the Soundex equivalent of “Dynamic Information Systems Corporation” is “DNMKNFRMTNSSTMSKRP”.

Also note that when processing a predicate of “column = $SOUNDEX(“string”), if “column” can be satisfied with an MDK index using the ;SX option, then the query will do so, even though the $SOUNDEX function is not applied to the left operand, and keywording may be involved. If an MDK index using the ;SX option cannot be used, then either the column must contain the Soundex equivalent, or the $SOUNDEX function must be used on the left operand as well.

For more information on Soundex searches, also known as Phonetic searches, see Omnidex Text and Phonetic Searches.


$SOUNDEX( <column_spec | 'string' >)

<column_spec | 'string' >

Required. This may be a CHARACTER or STRING column, or a string literal


Example 1

> SELECT $soundex('williams') FROM $omnidex
Back to top
dev/sql/functions/soundex.txt · Last modified: 2016/06/28 22:38 (external edit)