简体   繁体   中英

SQL Alphanumeric Pattern Matching

we ran into an issue where we need to test two varchar numeric strings. So if we had one string like '123456' and '123465'. The character could be swapped at any place in the string. I have no clue what to even Google for help with this, but my hope would be to assign a match ranking percentage. Is that even feasible? Any direction would be extremely appreciated.

You might google "Levenshtein distance". Here's a potentially relevant answer:

Levenshtein distance in T-SQL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM