title: Alternate to oracle first_value() in sqlserver 2005
body: <p>I have a below query in oracle:</p>
  
  <pre><code> SELECT DISTINCT
         first_value(status_date) OVER(PARTITION BY ccp_seq_no ORDER BY status_date DESC) status_date,
         first_value(payment_status) OVER(PARTITION BY ccp_seq_no ORDER BY status_date DESC) payment_status
  FROM dc_ccp_detail d; 
  </code></pre>
  
  <p>How would i write it in sqlserver 2005 </p>