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
 
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 How to force a select query to abend neo4u DB2 0 Mon Apr 23, 2018 1:36 pm
No new posts SELECT TO MULIPLE OUTFIL speermb DFSORT/ICETOOL 5 Fri Mar 23, 2018 10:44 pm
No new posts write multiple lines in PS file in cobol Balu5491 COBOL Programming 7 Wed Mar 07, 2018 10:27 am
No new posts help to replace columns by rows Vikas Maharnawar DFSORT/ICETOOL 8 Tue Mar 06, 2018 3:27 pm
No new posts Using multiple routines at exit 6 in ... Randy Horowitz All Other Mainframe Topics 2 Sat Feb 10, 2018 11:57 pm

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