This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dev:sql:functions:soundex [2009/12/07 16:57] tdo created |
dev:sql:functions:soundex [2016/06/28 22:38] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
{{page>:sql_bar&nofooter&noeditbtn}} | {{page>:sql_bar&nofooter&noeditbtn}} | ||
===== Description ===== | ===== Description ===== | ||
+ | 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. | ||
===== Syntax ===== | ===== Syntax ===== | ||
+ | $SOUNDEX( <column_spec | 'string' >) | ||
+ | |||
+ | <column_spec | 'string' > | ||
+ | |||
+ | Required. This may be a CHARACTER or STRING column, or a string literal | ||
+ | |||
===== Example ===== | ===== Example ===== | ||
==== Example 1 ==== | ==== Example 1 ==== |