title: Adding together two column sums in SQL Server2005
body: <p>Ive come across a problem when trying to add together two column sums. 
  Ive created a view with all the correct data in but when i try to execute a query like:</p>
  
  <pre><code>    Select ID, Sum(ColumnA),
      Sum(ColumnB)
      Sum(ColumnA) + Sum(ColumnB) AS ColumnC
      From View1
     Group by ID
  </code></pre>
  
  <p>The ColumnC figure is only correct when there is data in both columns, if there is only data in ColumnB then it displays that but if there is only data in ColumnA then it doesnt. </p>
  
  <p>Sometime when there isnt any data in ColumnA or B it will be NULL, so maybe this is the problem. 
  Hope there is a way around this.</p>
  
  <p>Cheers</p>