SoundEx Function | |
Convert a string to Soundex form.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION SoundEx(
cString AS STRING
) AS STRING
public static string SoundEx(
string cString
)
Request Example
View SourceParameters
- cString
- Type: String
The string to convert.
Return Value
Type:
String
A 4-digit string starting with an alphabetic character and ending with three digits.
Remarks
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 order using Soundex() to create the key values.
It then searches for a value found in the Salesman field:
1USE sales
2INDEX ON Soundex(Salesman) TO salesman
3SEEK Soundex("Smith")
4? Found(), salesman
Here, a search is made for the same key as above but with a different spelling:
1SEEK Soundex("Smythe")
2? Found(), salesman
See Also