OK

Got it.

I added an identity column to the table and then the following statement allows you get the result:


SELECT t.orderid, T.Col1, IsNull(T.Col2, (SELECT TOP 1 Col2 FROM Table
WHERE Col1 = T.Col1 AND Col2 IS NOT NULL AND ROWID < T.ROWID
ORDER BY ROWID DESC))
FROM Table T

My thanks to Timmy from OZ for his help on this.

j