Convert a character string to "soundex" form

     SOUNDEX(<cString>) --> cSoundexString


     <cString> is the character string to convert.


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


     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.


     .  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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.