Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 44309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:37:55+00:00 2026-05-10T15:37:55+00:00

We have a SQL Server table containing Company Name, Address, and Contact name (among

  • 0

We have a SQL Server table containing Company Name, Address, and Contact name (among others).

We regularly receive data files from outside sources that require us to match up against this table. Unfortunately, the data is slightly different since it is coming from a completely different system. For example, we have ‘123 E. Main St.’ and we receive ‘123 East Main Street’. Another example, we have ‘Acme, LLC’ and the file contains ‘Acme Inc.’. Another is, we have ‘Ed Smith’ and they have ‘Edward Smith’

We have a legacy system that utilizes some rather intricate and CPU intensive methods for handling these matches. Some involve pure SQL and others involve VBA code in an Access database. The current system is good but not perfect and is cumbersome and difficult to maintain

The management here wants to expand its use. The developers who will inherit the support of the system want to replace it with a more agile solution that requires less maintenance.

Is there a commonly accepted way for dealing with this kind of data matching?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:37:56+00:00Added an answer on May 10, 2026 at 3:37 pm

    Here’s something I wrote for a nearly identical stack (we needed to standardize the manufacturer names for hardware and there were all sorts of variations). This is client side though (VB.Net to be exact) — and use the Levenshtein distance algorithm (modified for better results):

        Public Shared Function FindMostSimilarString(ByVal toFind As String, ByVal ParamArray stringList() As String) As String         Dim bestMatch As String = ''         Dim bestDistance As Integer = 1000 'Almost anything should be better than that!          For Each matchCandidate As String In stringList             Dim candidateDistance As Integer = LevenshteinDistance(toFind, matchCandidate)             If candidateDistance < bestDistance Then                 bestMatch = matchCandidate                 bestDistance = candidateDistance             End If         Next          Return bestMatch     End Function      'This will be used to determine how similar strings are.  Modified from the link below...     'Fxn from: http://ca0v.terapad.com/index.cfm?fa=contentNews.newsDetails&newsID=37030&from=list     Public Shared Function LevenshteinDistance(ByVal s As String, ByVal t As String) As Integer         Dim sLength As Integer = s.Length ' length of s         Dim tLength As Integer = t.Length ' length of t         Dim lvCost As Integer ' cost         Dim lvDistance As Integer = 0         Dim zeroCostCount As Integer = 0          Try             ' Step 1             If tLength = 0 Then                 Return sLength             ElseIf sLength = 0 Then                 Return tLength             End If              Dim lvMatrixSize As Integer = (1 + sLength) * (1 + tLength)             Dim poBuffer() As Integer = New Integer(0 To lvMatrixSize - 1) {}              ' fill first row             For lvIndex As Integer = 0 To sLength                 poBuffer(lvIndex) = lvIndex             Next              'fill first column             For lvIndex As Integer = 1 To tLength                 poBuffer(lvIndex * (sLength + 1)) = lvIndex             Next              For lvRowIndex As Integer = 0 To sLength - 1                 Dim s_i As Char = s(lvRowIndex)                 For lvColIndex As Integer = 0 To tLength - 1                     If s_i = t(lvColIndex) Then                         lvCost = 0                         zeroCostCount += 1                     Else                         lvCost = 1                     End If                     ' Step 6                     Dim lvTopLeftIndex As Integer = lvColIndex * (sLength + 1) + lvRowIndex                     Dim lvTopLeft As Integer = poBuffer(lvTopLeftIndex)                     Dim lvTop As Integer = poBuffer(lvTopLeftIndex + 1)                     Dim lvLeft As Integer = poBuffer(lvTopLeftIndex + (sLength + 1))                     lvDistance = Math.Min(lvTopLeft + lvCost, Math.Min(lvLeft, lvTop) + 1)                     poBuffer(lvTopLeftIndex + sLength + 2) = lvDistance                 Next             Next         Catch ex As ThreadAbortException             Err.Clear()         Catch ex As Exception             WriteDebugMessage(Application.StartupPath , [Assembly].GetExecutingAssembly().GetName.Name.ToString, MethodBase.GetCurrentMethod.Name, Err)         End Try          Return lvDistance - zeroCostCount     End Function 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Related Questions

Loading...

Sidebar

Ask A Question

Stats

  • Questions 54k
  • Answers 54k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Could it be an initializer for a static object that… May 11, 2026 at 7:27 am
  • added an answer it prevents the 'double submit problem' Never show pages in… May 11, 2026 at 7:27 am
  • added an answer StyleCop for ReSharper would certainly help: StyleCop for ReSharper is… May 11, 2026 at 7:27 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.