0

How to find the count of character mismatch between two values in a SQL Server stored procedure? It's not about the length difference.

For example, there are two values,

  • Reference value ='Visual'
  • Test value ='Visvolc'

Mismatch = 3 chars (4th, 5th and 7th position)

There is 3 character mismatch based on the position. please help.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
A.W
  • 35
  • 1
  • 8

1 Answers1

0

Sounds like what you are looking for is “edit distance”, a number of add/remove/replace operation to convert one string into another. Check this post: Levenshtein distance in T-SQL

Mike Twc
  • 2,230
  • 2
  • 14
  • 19