Find similarity number on two name columns in the same table

  • Hello,

    I have one table and in that table are two name fields, how do I find the similarity/confidence level for those two names? I tried using the fuzzy lookup but that gives me the similarity/confidence of the best match in the same table but not what it is for that row. Here's the output I'm trying to achieve.

    Original Table

    Row Name1 Name2

    1 John Joe

    2 John John

    3 Tim Timothy

    Output Table

    Row Name1 Name2 SimilarityBetweenName1and2 ConfidenceBetweenName1and2

    1 John Joe .50 .25

    2 John John 1 1

    3 Tim Timothy .90 .80

    Thanks in advance.

  • You might wanna test Levenshtein Distance Algorithm for both strings.

    Here's an implementation in TSQL:

    Levenshtein Distance Algorithm: TSQL Implementation

    You'll also need this function for it to work:

    MinOf3[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply