db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Six Fried Rice <tech...@sixfriedrice.com>
Subject Re: Paging Result Sets
Date Fri, 02 May 2008 14:00:34 GMT
On Apr 28, 2008, at 8:02 AM, Rick Hillegas wrote:

> The new 10.4 release provides support for the sql standard  
> ROW_NUMBER function, which you can use for paging through query  
> results. You can find this function documented in the ROW_NUMBER  
> subsection of the "Built-in functions" section of the 10.4 Reference  
> Manual.

Thanks for the info. I have another developer working on this part,  
and he reports that, ie, this query:

> select * from (select row_number() over() as rownum,  
> table_occurrence.* from table_occurrence) as temp where rownum>=1  
> and rownum<=10

Works as expected when executed through the IJ console. But when  
executed through the JDBC application, he gets this error:

> 1147 FATAL [http-8080-Processor25]  
> com.sixfriedrice.lumen.ddrserver.utility.BuildQuery     - Error in  
> query :java.sql.SQ
> LSyntaxErrorException: Syntax error: Encountered "(" at line 1,  
> column 40.

Does that make sense to anyone?

Thanks,

Geoff

Mime
View raw message