IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Solution required...


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ajitkumar

New User


Joined: 03 Feb 2006
Posts: 1
Location: Chennai

PostPosted: Sun Feb 05, 2006 8:38 am
Reply with quote

Hi,

could anyone please resolve the problem as mentioned under :

I have millions of record in a table, but just want to skip first 29 records and then fetch only 30 records.
Back to top
View user's profile Send private message
pa1chandak
Currently Banned

New User


Joined: 31 Jan 2006
Posts: 55

PostPosted: Mon Feb 06, 2006 9:43 am
Reply with quote

use

skiprec(29)
and stopafter(30)


pawan
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Mon Feb 06, 2006 4:42 pm
Reply with quote

See as the data in a DB2 table is considered unordered if you are not using an ORDER BY clause.

In case you are using one
(1) One way is to use cursor and skip the first 29 rec and then process next 30 records.

(2) Or you can try this link

http://forums.devshed.com/db2-development-114/row-offset-and-fetch-first-rows-157033.html


Regards,
Umesh
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
No new posts A very ingenious mainframe automation... CA Products 1
No new posts Typing the CENT sign ยข on mainframe,... All Other Mainframe Topics 2
No new posts COMPUSET/XICS z/os document required All Other Mainframe Topics 1
Search our Forums:

Back to Top