title: Average a null columns in stored procedure
body: <p>I have a stored procedure and I want to average null columns.</p>
  
  <p>This is my stored procedure :</p>
  
  <pre><code>SELECT 
      AVG(planned) AS Planned,
      AVG(achieved) AS Achieved 
  FROM 
      Port 
  INNER JOIN 
      Technology ON Port.portID = Technology.portRef 
  </code></pre>
  
  <p>I bind this stored procedure to a chart using datasource and when the column is null the C# code throws this error:</p>
  
  <blockquote>
    <p>Value was either too large or too small for a Decimal. </p>
  </blockquote>
  
  <p>How can I handle my stored procedure to <code>avg</code> those null columns?</p>