title: Microsoft SQL, ROW_NUMBER & OUTER APPLY
body: <p>I am having some problems with an outer apply, specifically that I cant reference ROW from within the OUTER APPLY.</p>
  
  <p>Note if i place the where ROW criteria outside of the outer apply people without a 3 ,4 or 5th row for example aren't returned.</p>
  
  <pre><code>OUTER APPLY 
  (
  SELECT  ROW_NUMBER()
               OVER (ORDER BY L.DATECREATED) AS ROW,
               L.PERCENTAGE
               LABOURALLOCATION L
               ***WHERE ROW = 1***
  ) RECORDS
  </code></pre>