title: Update and Replace Values in one Table Column with Values from another Table Column
body: <p>I have 2 tables:</p>
  
  <pre><code>id | bsi | cell 
  
  1  | 45 | NULL
  2  | 23 | 600-1167
  3  | 47 | 
  4  | 89 | 501- -
  5  | 98 | 603-5670
  </code></pre>
  
  <p>I would like to replace cell values with data from another colum in another table matching both tables by bsi</p>
  
  <p>Here is my 2nd table:</p>
  
  <pre><code>id | bsi | contact 
  
  1  | 45 | 610-5896 
  2  | 23 | 605-4567 
  3  | 47 | NULL 
  4  | 89 | 689-9089
  5  | 98 | NULL
  </code></pre>
  
  <p>I would like each value in the first table replaced with the new value in 2nd table also the value where both tables match in bsi code ie to replace the NULL and '501- -' with the new value once there is one in the 2nd table. </p>
  
  <p>So result should be an updated table as follows:</p>
  
  <pre><code>id | bsi | cell 
  
  1  | 45 | 610-5896
  2  | 23 | 605-4567
  3  | 47 | NULL
  4  | 89 | 689-9089
  5  | 98 | 603-5670
  </code></pre>
  
  <p>I have tried this query but it only replaces the new values and seems to write null values for items that are in table1 and not table2. I want to keep the table1 values that are in table 1 but not table 2. </p>
  
  <pre><code>UPDATE Table1 
     SET Table1.cell = Table2.Contact
     FROM Table1  INNER JOIN Table1 ON Table1.bsi = Table2.bsi
  </code></pre>