SOUNDEX
Computes the Soundex code of a string.
This function corresponds to the soundex(X) function in SQLite. Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. The goal is for homophones to be encoded to the same representation so that they can be matched despite minor differences in spelling.
The function converts the input string to its Soundex code, which is a four-character string consisting of a letter followed by three numbers (e.g., 'R163').
If the input is NULL, the result is NULL. If the input string contains no English letters, the function returns a string of four question marks ('????').
This function requires the SQLITE_SOUNDEX compile-time option to be enabled in the underlying SQLite library. If not available, using this function will result in an error.
Example
// Find users with names that sound like "Robert"
// soundex('Robert') -> 'R163'
// soundex('Rupert') -> 'R163'
val similarNames = select(Users.name)
.from(Users)
.where(SOUNDEX(Users.name) eq SOUNDEX(StringLiteral("Robert")))Return
A KQLiteColumn of type String containing the four-character Soundex code, or NULL if the input is NULL.
Author
MOHAMMAD AZIM ANSARI
Parameters
The column or string value to convert to its Soundex code.