title: Sybase IQ Pagination
body: <p>I wonder if anyone has a solution to the following requirement.  I have a stored procedure which returns a result set of for example 1000 rows.  Now I need to limit this to 100 rows at a time.  So I will pass in a start and end index value and I only want the records between the start index rowcount and the end index rowcount</p>
  
  <p>So for example my stored procedure call signature looks like this:-</p>
  
  <pre><code>stp_mystoredproc(startIndex INTEGER, endIndex INTEGER)
  </code></pre>
  
  <p>So if I set <code>startIndex = 100</code> and <code>endIndex = 200</code> then I want the stored procedure to return the records in rows 100 to 200 out of the total reset set of 1000.</p>
  
  <p>My first attempt is put the result set in a temp table with an identity column then select based on the identity the range I need but this is somewhat slow.  I know Oracle supports pagination so you can page through your result set.  Anyone know if Sybase IQ (v12.6 or v12.7) supports something similar?</p>
  
  <p>The end goal is to page through the entire result set (1000 records) but in 100 row pages at a time.</p>