title: Best Practice For Lookup Tables In SQL
body: <p>I am fairly new to SQL so apologies if this questions sounds odd.</p>
  
  <p>I keep coming across the issue of poor data. As an example London could be stored as LON, London UK, London England etc. Prior to using SQL I had lots of Excel lookup tables where in the first column I would have the original, and in the 2nd helper column I would have the corrected version. As an example:</p>
  
  <pre><code>Name             Name_1
  London, UK       London
  Lon              London
  LON              London
  London           London
  London, England  London
  LND              London
  </code></pre>
  
  <p>Is there a straightforward way of doing this in SQL? I am currently trying to create lookup tables and then use joins. This is becoming tricky as I do not always have corrections for every instance, so in most scenarios my lookup tables have fewer items than the tables I'm joining them to.</p>
  
  <p>I've been teaching myself about stored procedures and I wondered if this could solve the problem. Trouble is my searching on the subject of lookup tables is coming up empty.</p>
  
  <p>Any advice or pointers would be gratefully received, even if it is just to say that this cannot be done.</p>
  
  <p>Thanks as always for you help and apologies for the long post.</p>