title: SQL Server update set amount = (positive numeric) + (negative numeric) increases amount? Why?
body: <p>I'm performing an update from a global temp table like this:</p>
  
  <pre><code>update some_table
  set Amount = (##GlobalTable.InitialAmount) + (##GlobalTable.[Difference])
  from ##GlobalTable
  where Amount = ##GlobalTable.InitialAmount
  </code></pre>
  
  <p>The Amount, InitialAmount, and Difference columns are all numeric(21,2)</p>
  
  <p>The Amount and InitialAmount are always positive.  The problem is that when the Difference is negative the resulting Amount is actually increased by the negative difference.  It should be performing subtraction, but it's not.  When Difference is positive it works fine.  Any ideas why this is happening?</p>
  
  <p>I'm on Windows 7 Enterprise SP1 64 bit using SQL Server 2008 R2 </p>