If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > cursors

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-22-09, 14:12
mahesh666 mahesh666 is offline
Registered User
 
Join Date: Jun 2009
Posts: 1
cursors

how to fetch selected rows without using scrollable cursors?
Reply With Quote
  #2 (permalink)  
Old 06-22-09, 14:45
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
That would be the FETCH statement.

Andy
Reply With Quote
  #3 (permalink)  
Old 06-22-09, 18:34
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
mahesh666, what exactly do you want to do?

If you have a query returning multiple rows, the cursor is needed.

If you want to 'scan' through the cursor from top to bottom, then a standard cursor with Fetch (as Andy pointed out) works.

However, if you want to go back and forth through the result set, then you need a scrollable cursor.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On