title: How to implement First_Value() over() in SQL Server 2008?
body: <p>I need an alternative for <code>first_value</code> in SQL Server 2008. </p>
  
  <pre><code>select distinct 
      spisznacka, 
      first_value(VdruhStavRizeni) over (partition by spisZnacka order by id desc) as stav 
  from 
      isirshort
  where 
      VdruhStavRizeni !='' 
  </code></pre>
  
  <p>I need <code>spisznacka</code> and last not null value of <code>VdruhStavRizeni</code>... 1 <code>spisznacka</code> has 1 <code>VdruhstavRizeni</code></p>
  
  <p>Thanks for answers. </p>