Daniel Noll wrote:
On Thursday 15 May 2008 01:12:21 Six Fried Rice wrote:
You can write your query like this:
SELECT ROW_NUMBER() OVER() as rownum, spool_table.* FROM spool_table
ORDER BY date_inserted WHERE rownum <= 100
And it should do the trick. This requires Derby 10.4.
This is quite interesting. Is there also a way to do this if you need to join
to another table, such that it selects rows 100 to 200 of the first table
before doing the join to the second?
Daniel
I wasn't able to get that one to run with 10.4, it complained about the
placement of the WHERE clause.
--
-Matt
Cue3 Development Progress
<http://twiki.spimageworks.com/twiki/bin/view/Software/CueDevelopment>
Middle-Tier Homepage
<http://twiki.spimageworks.com/twiki/bin/view/Software/MiddleTier>