title: SQL Server Interpolate Missing rows
body: <p>I have the following table which records a value per day. The problem is that sometimes days are missing. I want to write a SQL query that will:</p>
  
  <ol>
  <li>Return the missing days</li>
  <li>Calculate the missing value using linear interpolation</li>
  </ol>
  
  <p>So from the following source table:</p>
  
  <pre><code>Date           Value
  --------------------
  2010/01/10     10
  2010/01/11     15
  2010/01/13     25
  2010/01/16     40
  </code></pre>
  
  <p>I want to return:</p>
  
  <pre><code> Date           Value
   --------------------
   2010/01/10     10
   2010/01/11     15
   2010/01/12     20
   2010/01/13     25
   2010/01/14     30
   2010/01/15     35
   2010/01/16     40
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>