SQL. I'm looking for a way to populate the values between numbers with duplicate values
<p>SequentialOrder cost</p>

<pre><code>1    NULL
2    NULL
3    NULL
4    NULL
5    NULL
6    NULL
7    5.766
8    NULL
9    5.767
</code></pre>

<p>I am using Sql Server 2008 R2. I am looking for a way to duplicate down the values for the lower "sequential orders" when the cost doesn't exist. I tried learning from this example (<a href="https://stackoverflow.com/questions/16819365/how-to-fill-the-gaps">How to fill the gaps?</a>) but failed.   For example, I want to turn the above table into something that resembles the following:</p>

<p>SequentialOrder cost</p>

<pre><code>1    5.766
2    5.766
3    5.766
4    5.766
5    5.766
6    5.766
7    5.766
8    5.767
9    5.767
</code></pre>