SQLite: Difference between revisions
Jump to navigation
Jump to search
Jkuehlthau (talk | contribs) No edit summary |
Jkuehlthau (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
SELECT * FROM TABLE WHERE LEVENSHTEIN('Technology Advisors, Inc.', TABLE.NAME) < 5 | SELECT * FROM TABLE WHERE LEVENSHTEIN('Technology Advisors, Inc.', TABLE.NAME) < 5 | ||
</source> | </source> | ||
=Issues= | |||
If your source SQLite table has a DateTime field, you may get the error: “String not recognized as a valid datetime”. If you get this error, add "datetimeformat=CurrentCulture", without double quotes, to the "Additional Connection String Parameters:" field on the Origin tab. |
Revision as of 19:45, 1 April 2019
Levenshtein
The SQLite connector has the Levenshtein function! A couple of examples:
SELECT LEVENSHTEIN( 'Microsoft', 'Technology Advisors, Inc.' )
Result: 21
SELECT LEVENSHTEIN( 'Technology Advisors Inc', 'Technology Advisors, Inc.' )
Result: 2
Comparing 2 strings is obviously less than useful, so you would want to do something like:
SELECT * FROM TABLE WHERE LEVENSHTEIN('Technology Advisors, Inc.', TABLE.NAME) < 5
Issues
If your source SQLite table has a DateTime field, you may get the error: “String not recognized as a valid datetime”. If you get this error, add "datetimeformat=CurrentCulture", without double quotes, to the "Additional Connection String Parameters:" field on the Origin tab.