title: SQL-Server 2014. UPDATE joining two tables and using table aliases
body: <p>I have two almost identical tables. 
  Need to update every <code>Postal</code> in TABLE_03 when it's <code>NULL</code> 
  There's no ID or Primary Key to use so I'm linking these with columns <code>Link</code>, <code>Name</code> and <code>PhoneNum</code> /  ( <code>Phone</code> in TABLE_ALL )</p>
  
  <p>Tried SQL: </p>
  
  <pre><code> UPDATE TABLE_03 a
     join TABLE_ALL b 
     ON   a.Link = b.Link,
          a.Name = b.Name,
          a.PhoneNum = b.Phone
     SET a.Postal = b.PostalCode
    WHERE a.Postal IS NULL;
  </code></pre>
  
  <p>SQL Server gives error</p>
  
  <pre><code>Incorrect syntax near 'a'.
  </code></pre>
  
  <p>Without aliases : </p>
  
  <pre><code>  UPDATE TABLE_03 
     join TABLE_ALL 
     ON   TABLE_03.Link = TABLE_ALL.Link,
          TABLE_03.Name = TABLE_ALL.Name,
          TABLE_03.PhoneNum = TABLE_ALL.Phone
     SET TABLE_03.Postal = TABLE_ALL.PostalCode
    WHERE TABLE_03.Postal IS NULL; 
  </code></pre>
  
  <p>Gives error: </p>
  
  <pre><code>Incorrect syntax near the keyword 'join'.
  </code></pre>