[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SOUNDEX()
 Convert a character string to "soundex" form
------------------------------------------------------------------------------
 Syntax

     SOUNDEX(<cString>) --> cSoundexString

 Arguments

     <cString> is the character string to convert.

 Returns

     SOUNDEX() returns a four-digit character string in the form A999.

 Description

     SOUNDEX() is a character function that indexes and searches for sound-
     alike or phonetic matches.  It is used in applications where the precise
     spelling of character keys is not known or where there is a high
     probability of misspelled names.  Misspelling is common in real-time
     transaction systems where the data entry operator is receiving
     information over the telephone.  SOUNDEX() works by bringing
     sound-alikes together under the same key value.  Note, however, the
     soundex method is not absolute.  Keys that are quite different can
     result in the same soundex value.

 Examples

     .  This example builds an index using SOUNDEX() to create the key
        values.  It then searches for a value found in the Salesman field:

        USE Sales
        INDEX ON SOUNDEX(Salesman) TO Salesman
        SEEK SOUNDEX("Smith")
        ? FOUND(), Salesman            // Result: .T. Smith

     .  Here, a search is made for the same key as above but with a
        different spelling:

        SEEK SOUNDEX("Smythe")
        ? FOUND(), Salesman            // Result: .T. Smith

 Files   Library is EXTEND.LIB, source file is SOURCE\SAMPLE\SOUNDEX.C.


See Also: INDEX LOCATE SEEK SET SOFTSEEK
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson