简体   繁体   English

SQL字母数字模式匹配

[英]SQL Alphanumeric Pattern Matching

we ran into an issue where we need to test two varchar numeric strings. 我们遇到了需要测试两个varchar数字字符串的问题。 So if we had one string like '123456' and '123465'. 因此,如果我们有一个字符串,例如“ 123456”和“ 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. 我不知道该向Google寻求什么帮助,但是我希望能指定一个匹配排名百分比。 Is that even feasible? 那可行吗? Any direction would be extremely appreciated. 任何方向将不胜感激。

You might google "Levenshtein distance". 您可以使用Google搜索“ Levenshtein距离”。 Here's a potentially relevant answer: 这是一个潜在的相关答案:

Levenshtein distance in T-SQL T-SQL中的Levenshtein距离

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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