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

Fetching Multiple rows using select statement


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
Search our Forums:

Back to Top