• I am using SQL server 2005, 2008 and 2012 so CTE's are OK

    Thanks for your solution, but it looks a little messy as a view definition.

    I was thinking of something using ROWNUMBER.

    I think your solution has problems if there are more than one row with NULL between valid data.

    what is rn? a value from your Tally table?

    as in dateadd(day,rn-1,o1.dateval)