Generates the “sounds-like” value of a string.
|source||a character string, or an expression that evaluates to a character string|
Character string (alpha).
$soundex yields a “sounds-like” value for source. The value is created using an heuristic algorithm and is based on English pronunciation.
When $soundex is applied to two separate strings and they generate the same “sounds-like” value, then the two original strings can be assumed to sound the same. $soundex can be used to compare and find strings that sound the same but are spelled differently.
The result of $soundex is of data type ALPHA, therefore comparisons involving soundex values are case-insensitive.
find all Customers where $soundex(LastName) = $soundex(“Burton”)
The above command returns customer records for names like Burton, Berton, Bertyn, Bertin, BURTON, BERTIN, and so on.
find all Customers where sLastName = $soundex(“Burton”)
The preceding command takes advantage of indexed searching by setting up sLastName as an indexed virtual field that contains the soundex values of LastName in the Customers EntitySet.
let SoundsLike = $soundex(“Smith”)
find all Customers where sLastName = SoundsLike?
The preceding code fragment uses prefix searching (? wildcard) with soundex values.