This shows you the differences between two versions of the page.
dev:sql:functions:soundex [2009/12/07 16:57] tdo |
dev:sql:functions:soundex [2016/06/28 22:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{page>:top_add&nofooter&noeditbtn}} | ||
- | <html><div align="center"><span style="color:red">DRAFT</span></div></html> | ||
- | ====== Omnidex SQL Function: $SOUNDEX ====== | ||
- | {{page>:sql_bar&nofooter&noeditbtn}} | ||
- | ===== Description ===== | ||
- | Returns the Soundex equivalent to a character string ("string" may be a CHARACTER or C 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 C 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 ===== | ||
- | ===== Example ===== | ||
- | ==== Example 1 ==== | ||
- | <code SQL> | ||
- | > select $soundex('williams') from $omnidex | ||
- | |||
- | $SOU | ||
- | ---- | ||
- | WLMS | ||
- | |||
- | </code> | ||
- | {{page>:bottom_add&nofooter&noeditbtn}} |