soundex(X)
The soundex(X) function returns a string that is the soundex encoding of the string X. The string "?000" is returned if the argument is NULL or contains no ASCII alphabetic characters. This function is omitted from SQLite by default. It is only available if the SQLITE_SOUNDEX compile-time option is used when SQLite is built.
I undertood the soundex method to be for compairing names for similarities … Brian vs Bryan vs Brien …
What i’m trying to wrap my noodle around is how can i use this sqlite ‘method’ (?) from Xojo
db.SQLExecute(???) . Sounds like sqlite implementations may or may not have it based on compile time options.
its not built in and doesnt appear to be enabled in the version included in 2019r1.1
I wish they would just build it with pretty much ever yoptional component as part of it even if that meant the plugin were a tad larger
ICU would be awesome
EDIT - quick test suggests its also not built in to the version in 2019r3.1
Dim db As New SQLiteDatabase
If db.Connect Then
db.SQLExecute ( "create table foo ( bar ) ")
db.SQLExecute("insert into foo(bar) values('abc')")
db.SQLExecute("insert into foo(bar) values('123')")
Dim rs As recordset = db.SQLSelect("select bar, soundex(bar) from foo")
If db.Error Then
Break // you hit this break point & inspecting the error message reveals an "unknown function" error
End If
End If
Please remember, soundEx only works well in English language. It’s not useable in German. We have another phonetic logic called “Kölner Phonetik” (see Wikipedia). A decade ago I have implemented this in Xojo and this works pretty good.
SoundEx is already available in a variety of SQL databases. I would like to see Xojo at least provide this functionality (since it’s already there) for those who prefer to use it.
its literally something they could already compile in IF they set the right compilation flags
many other options are as well including ICU
see Compile-time Options
it boils any name/word or phrase down to a single Letter and 3 digit number, meaning that supposedly the entire “English” language would be represented by 26,000 unique code.
While working in the healthcare industry we needed to find ways to lookup similar sounding patient names, Soundex was an utter failure in terms of accuracy