title: compare 2 columns from 2 different tables and update a column
body: <p>I want to compare a column in table a and table b</p>
  
  <p>If the a value from table a can be found in table b then I want to update another column in table a with a 'yes' and if it cannot be found I want to say 'no'. This is what I have so far:</p>
  
  <pre><code>UPDATE a 
  set
  [CCA Match Org] = CASE WHEN b.[serial] = a.[CSI] THEN 'yes' ELSE 'no' END
  </code></pre>
  
  <p>My error at the moment says:</p>
  
  <blockquote>
    <p>The column prefix 'b' does not match with a table name or alias name used in the query.</p>
  </blockquote>