Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Solution required...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Solution required...
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP help required amitc23 All Other Mainframe Topics 3 Thu Apr 28, 2016 12:02 pm
No new posts Why Newcopy is required when we have ... DIXINSH CICS 5 Thu Apr 28, 2016 9:47 am
No new posts Tricky sort logic required pgopi92 DFSORT/ICETOOL 3 Mon Jan 25, 2016 3:29 pm
This topic is locked: you cannot edit posts or make replies. Need help in design the solution ritnihi PL/I & Assembler 1 Tue Dec 22, 2015 1:48 pm
No new posts Help required on sort kalakuntlavenkat DFSORT/ICETOOL 11 Sun Nov 15, 2015 8:55 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us