title: Return row of every n'th record
body: <p>How can I return every <em>nth</em> record from a sub query based on a numerical parameter that I supply?</p>
  
  <p>For example, I may have the following query:</p>
  
  <pre><code>SELECT
     Id,
     Key
  FROM DataTable
  WHERE CustomerId = 1234
  ORDER BY Key
  </code></pre>
  
  <p><strong>e.g.</strong> </p>
  
  <p>The subquery result may look like the following:</p>
  
  <pre><code>Row Id   Key
  1   1    A3231
  2   43   C1212
  3   243  E1232
  4   765  G1232
  5   2432 E2325
  ...
  90  3193 F2312
  </code></pre>
  
  <p>If I pass in the number 30, and the sub query result set contained 90 records, I would recieve the <em>30th</em>, <em>60th</em>, and <em>90th</em> row.</p>
  
  <p>If I pass in the number 40, and the result set contained 90 records, I would recieve the <em>40th</em> and <em>80th</em> row.</p>
  
  <p><em>As a side note, for background information, this is being used to capture the key/id of every nth record for a paging control.</em></p>