title: Pattern matching sql algorithm
body: <pre><code>Table 1
  Account ID   Account name 
  Missing      Agreete NV.
  
  
  Table 2 
  Account ID   Account name 
  XXX4546778   Agreete
  </code></pre>
  
  <p>I have to pouplate all the Account IDs in Table 1 based on the best match looking at the account name in both tables .</p>
  
  <p>I thought about like, patindex &amp; soundex.</p>
  
  <p>Thinking about it I was thinking compare full string, if no match then compare full string -1 , if not match then then compare full string -2 until you get a match.</p>
  
  <p>However someone must have came up with Pattern matching sql algorithm that will do this with a low error rate . Any ideas ?</p>