This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I agree with Bear Bibeault , I have implemented pagination in a module at the DB level ... heres a snapshot . I am using DB2.
WITH TEMP (ROWNUM,DIM_VAL_CD, IS_ACTIVE_IND,SEQUENCE_NBR)as (SELECT ROW_NUMBER() OVER(ORDER BY IS_ACTIVE_IND ,SEQUENCE_NBR ,UPPER(DIM_VAL_CD) ) ROWNUM, DIM_VAL_CD,IS_ACTIVE_IND,SEQUENCE_NBR FROM DIMENSIONVALUE WHERE DIM_TYPE_ID = ? ORDER BY IS_ACTIVE_IND ,SEQUENCE_NBR,UPPER(DIM_VAL_CD)) SELECT (SELECT MAX(ROWNUM) FROM TEMP ) TOTALROWS, DIM_VAL_CD,IS_ACTIVE_IND,IS_APPROVED_IND FROM TEMP WHERE ROWNUM >? AND ROWNUM <=? [ February 06, 2006: Message edited by: steveo austin ]
For non-DB2 databases, the syntac will be different. PostgreSQL, for example, employs the OFFSET and LIMIT keywords.
Joined: Sep 06, 2005
"Gururaj", you have already been asked in this very topic to adjust your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.
Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.
Be aware that accounts with invalid display names are closed.