title: Perl prepare DB2 statement not returning what I need
body: <p>Since I am using DB2, in order to select a portion of a database in the middle (like a limit/offset pairing), I need to do a different kind of prepare statement.  The example I was given was this: </p>
  
  <p>SELECT *
  FROM (SELECT col1, col2, col3, ROW_NUMBER() OVER () AS RN FROM table) AS cols
  WHERE RN BETWEEN 1 AND 10000;</p>
  
  <p>Which I adapted to this: </p>
  
  <p>SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY 2,3,4,6,7 ASC) AS rownum FROM TRANSACTIONS) AS foo WHERE rownum >= 500 AND rownum &lt;1000</p>
  
  <p>And when I call the fetchall_arrayref(), I do come out with 500 results like I want to, but it is only returning an array with references to the row number, and not all of the data I want to pull.  I know for a fact that that is what the code is SUPPOSED to do as its written, and I have tried a bunch of permutations to get my desired result with no luck.  </p>
  
  <p>All I want is to grab all of the columns like my previous prepare statement into an array of arrays: 
  SELECT * FROM TU_TRANSACTIONS ORDER BY 2, 3, 4, 6, 7</p>
  
  <p>but just on a designated section.  There is just a fundamental thing I am missing, and I just cant see it.</p>
  
  <p>Any help is appreciated, even if its paired with some constructive criticism.</p>