Anybody know how to use SQL to replace a null or zero value in a table with the last non-null or non-zero value? The table is layered by date--ex:
07-1-2014 5
10-1-2014 4
01-1-2015 0
04-1-2015 0
07-1-2015 4
10-1-2015 4
My goal is to replace those 0s with whatever non-zero value preceeded it, so the result should look like this:
07-1-2014 5
10-1-2014 4
01-1-2015 4
04-1-2015 4
07-1-2015 4
10-1-2015 4