Six Fried Rice wrote:
On May 13, 2008, at 6:11 PM, Matt Chambers wrote:
Thanks for response. I tried that one, was a no go.
Normally, I would do a SELECT * FROM
spool_table ORDER BY date_inserted ASC LIMIT 100 to grab the oldest
entries but Derby can't do limit and you can't user ORDER BY in sub
selects. So how do I get my data out of the table in small chunks in
the same order it went in?
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.
Hope it helps :)
ij version 10.4
That query gives me:
ERROR 42X01: Syntax error: Encountered "WHERE" at line 1, column 75.