title: SQL update query and 'subquery returned more than one value'
body: <p>I am using SQL Server 2008, R2.  Have a master table (table A), and am trying to update it with values from a temp table (Table B).</p>
  
  <p>SQL Server is erroring out, saying that the subquery returned more than one value, however I don't see how this is possible since the value returned by the subquery is the primary key of Table B.</p>
  
  <p>Here's the query:</p>
  
  <pre><code>UPDATE TableA  
     SET TableA.field = (SELECT TableB.field  
                           FROM TableA 
                     INNER JOIN TableB ON TableA.key = TableB.key) 
  </code></pre>
  
  <p>Any assistance greatly appreciated, as usual!</p>