title: UPDATE table from another table with case statement
body: <p>I'm currently having a problem. I need to update Table A from Table B based on this condition:</p>
  
  <ul>
  <li>If one record in Table A is null (ex. name) then update that record from Table B</li>
  </ul>
  
  <p>Here's my error driven script which I thought from my head. This is what I wanted to happen.</p>
  
  <pre><code>UPDATE TableA
     SET 
        NAME =
        (
           CASE WHEN TableA.NAME IS NULL THEN
              SELECT TableB.NAME
              FROM TableB
              WHERE TableB._ID = 1
        ),
        ADDRESS =
        (
           CASE WHEN TableA.ADDRESS IS NULL THEN
              SELECT TableB.ADDRESS
              FROM TableB
              WHERE TableB._ID = 1
        )
     WHERE TableA._ID = 1
  </code></pre>
  
  <p>Something like that. Any ideas?</p>