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

Without Cursor I need to fetch next record


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

New User


Joined: 06 Apr 2005
Posts: 30
Location: visakhapatnam

PostPosted: Mon Sep 29, 2008 12:20 pm
Reply with quote

Hi,
I want to know is there any query for fetching the next record without using a CURSOR.
Back to top
View user's profile Send private message
birdy K

New User


Joined: 05 Mar 2008
Posts: 72
Location: chennai

PostPosted: Mon Sep 29, 2008 12:29 pm
Reply with quote

Hi,

You can use fetch first row only in the select statement. But you have given as next record. Give the condition in where clause as per your requirement and fecth the next record. For ex If you know the current value then you can given as ">" current value and fetch first row alone.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 29, 2008 11:45 pm
Reply with quote

Hello,

Quote:
I want to know is there any query for fetching the next record without using a CURSOR.
If you do not declare a cursor and open it to "select the set" of matching data, there is no "next record". . .
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top