Wednesday, 7 August 2013

Filling in missing data

Filling in missing data

I am working in SQL Server. Suppose I have the following table:
3/1/2013 aaa
1/1/2013 bbb 1
10/10/2012 ccc
9/9/2012 ddd
8/8/2012 bbb 2
I would like to take the values from the "bbb" rows and propagate them
upwards (ordering by date) essentially making:
3/1/2013 aaa 1
1/1/2013 bbb 1
10/10/2012 ccc 2
9/9/2012 ddd 2
8/8/2012 bbb 2
What is the best way to do this in SQL Server?

No comments:

Post a Comment