A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
Joined: Dec 21, 2006
Dec 17, 2007 04:28:00
Currently , I'm dealing with pagination .
I'm tryiing to do it by query.
but,i'm n't successful.
Pls. help me.
My query is:
query = "Select * from (Select a.*, rownum rnum From (select * from "
+ " order by rowid desc)a where rownum <= "
+ (recordsPerPage * (Integer.parseInt(pageNumber)))
+ ") where rnum >"
+ (recordsPerPage * ((Integer.parseInt(pageNumber) - 1)))
with this query,
I'm not able to get all the results.
I'm missing some records.(say, missing 2 of 6)
I mean, this is working fine for Next button in jsp , but not for Previous button.
How can i modify the query?
Pls help me.
Joined: May 26, 2003
Dec 17, 2007 17:38:00
First, try printing out the query. Are the indices what you expect?
How To Ask Questions The Smart Way
Blogging on Certs:
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: Pagination Issue
pagination - Where
Pagination Query in Oracle
Pagination using resultset to populate a tablemodel
Improving performance in Pagination
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014