Welcome!   Search Scrabble┬« Dictionary using DLD   Statistics   Compare any two Strings using DLD   Reference   Your IP

Compare two Strings, using Damerau-Levenshtein distance in T-SQL

This is the most informative calculator demonstrating the Damerau-Levenshtein distance algorithm! See the Reference page for other demonstration calculators.

Type a string (word or phrase) in each box and press Enter to see how similar they are, using fuzzy-string processing.



You will be shown how to Transform the first string to become the second string. The necessary Changes are displayed visually in a matrix.

The matrix has a row for each letter of the first string, so it will be tall and narrow if you make the first string longer than the second string. (The SQL code currently handles up to 253 letters, but this web page only allows up to 100 letters, to avoid a huge matrix with a long load time.)

Note that although this site uses a binary collation for complete case-sensitivity and accent-sensitivity, you can choose to implement this code with a different collation, if you desire case-insensitivity and/or accent-insensitivity. Also, since only single letters are compared, Unicode Canonical Equivalence of multi-character sequences cannot be considered here (strings must be normalized before comparison).