title: SQL - When value is not numeric
body: <p>I have two tables in SQL and I'm looking up a reference number against a third table. What I'm try to get to is a syntax that says:</p>
  
  <pre><code>CASE
      WHEN NUM (TABLE 1) = NAME THEN LEFT(NUM (TABLE 1),14)
      WHEN NAME = ''UK'' THEN LEFT(NUM (TABLE 1),11)
      **** WHEN LEFT(NUM (TABLE 1), 3) IS NOT NUMERIC THEN LOOK FOR NUM IN TABLE 2*** 
      ELSE ACCGRPNUM
  END AS ID,
  </code></pre>
  
  <p>I have inserted this (TABLE 1) to show where the two tables come into play.</p>
  
  <p>Thanks in advance</p>