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

Need help for fectch cursor


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

New User


Joined: 20 Sep 2010
Posts: 9
Location: Pune

PostPosted: Mon May 07, 2012 12:28 pm
Reply with quote

Hi Team,

I have to design a query in DB2 and my requirement is as follow

Select * from table;

Suppose above query will give 100 rows as output.

But I want to get display rows from 10 to 20 first time.
Next time I might want to display rows from 20 to 30 or 1 to 10, so it depends on runtime.

Can we retrieve rows within specific range using FETCH clause? if not please provide us any alternative way.

Thanks you for help in advance.

Thanks
Kiran Bhamare
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Mon May 07, 2012 12:47 pm
Reply with quote

You may try with Scrollable cursor
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 Is SQLCODE -811 possible while fetchi... DB2 1
No new posts Restart logic by using cursor name in... DB2 1
No new posts Seeking Resolution for SQKCODE -991 o... DB2 2
No new posts Multiple rows within Cursor when Coun... DB2 14
No new posts Dynamic cursor name in Cobol program COBOL Programming 1
Search our Forums:

Back to Top