Query Use of Levenshtein Distance - Case Sensitivity
回答済みI have a query that utilizes the Levenshtein Distance function to test for similarities between employee names and vendor names within our records. Currently all of the query results have a Levenshtein Distance of 2, but it appears that the function is case-sensitive. Is there a way to eliminate the case sensitivity of this function to just highlight necessary insertions, deletions or substitutions required to produce a matching string and rid the comparison of capitalization across strings?
-
正式なコメント
Glad it worked and we got you off and running. Come back any time with questions.
For more context - I am worried that a distance of 2 could indicate a matching string that only differs in case.
e.g., if the vendor name is 'CAM' and it matches to a name value of 'Cam,' I fear current functionality would return a Levenshtein Distance of 2, when I would prefer it return a distance of 0.
0Hi Alec,
Thanks for using the Community! Would the use of UPPER be a viable option?
Ex: levenshtein_distance(UPPER(field1), UPPER(field2))
Tony
1Tony,
That worked like a charm. I did not realize there was a function to temporarily change the case of data only for the sake of a query. Thank you for your quick response!
Alec
0サインインしてコメントを残してください。
コメント
4件のコメント