daidaluus Yak Posting Veteran
69 Posts
khtan In (Som, Ni, Yak)
Singapore 16746 Posts
select d.id, isnull( d.value, (select top 1 value from data x where x.id < d.id and x.value is not null order by id desc) ) from data d