title: Populate column from table X with value from table Y
body: <p>A fellow developer changed all the values in the <code>userid</code> column of table <code>map</code>.  I need them changed back, because <code>userid</code> is also a key in the <code>profiles</code> table.  Thankfully, for reasons that aren't worth going into, <code>map</code> and <code>profiles</code> share another column in common, <code>employeeId</code>.</p>
  
  <p>So I'd like to take all the values for <code>userid</code> as found in <code>profiles</code> and overwrite the values found in <code>userid</code> the matching row of <code>map</code>.</p>
  
  <p>My instinct is to do something like this:</p>
  
  <pre><code>UPDATE map,profiles
  SET map.userid = profiles.userid
  WHERE map.employeeId = profiles.employeeId
  </code></pre>
  
  <p>But SQLServer 2005 doesn't care to have two tables in the UPDATE clause.</p>
  
  <p>Any suggestions?</p>