Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Fetching Multiple rows using select statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
jasveer singh

New User


Joined: 06 Mar 2006
Posts: 16

PostPosted: Tue Feb 20, 2007 12:26 pm    Post subject: Fetching Multiple rows using select statement
Reply with quote

Hi ,

Can you please help me in this . I want to use a select statement to find out all the rows that satisfy a particular condition but more than one row may qualify to be fecthed . How should i proceed with the coding ?

Do i need to define a cursor or something else . Actually i am not sure how does cursor works

Regards,
jasveer Singh ,
+91-9847746542
Back to top
View user's profile Send private message

rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue Feb 20, 2007 12:30 pm    Post subject:
Reply with quote

you should define the cursor.........

declare the cursor..

open the cursor..
fetch the row in to host variables and to the process/logic u wish
untill all rows exhausted (100)
close the cursor..


for more info look in to the manuals.....

regards,
jr
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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us