Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Is it possible to open two cursors with WITH HOLD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
rkr

New User


Joined: 19 Apr 2005
Posts: 12

PostPosted: Mon Jun 06, 2005 9:51 pm    Post subject: Is it possible to open two cursors with WITH HOLD
Reply with quote

Hi
can anybody tell me that, is it possible to open two cursors in same program with WITH HOLD option.
actually i faced this question in an interview in Accenture.
So plz clear me asap.
Back to top
View user's profile Send private message
References
PostPosted: Mon Jun 06, 2005 9:51 pm    Post subject: Re: Is it possible to open two cursors with WITH HOLD Reply with quote

Pushpak

New User


Joined: 06 May 2005
Posts: 22

PostPosted: Tue Jun 07, 2005 1:11 pm    Post subject: Re: Is it possible to open two cursors with WITH HOLD
Reply with quote

Hi,

I have tested it. It works. Two cursors with " WITH HOLD" option for 2 diff tables in same program. It is working fine.

Pushpak.
Back to top
View user's profile Send private message
rkr

New User


Joined: 19 Apr 2005
Posts: 12

PostPosted: Wed Jun 08, 2005 5:45 pm    Post subject: Re: Is it possible to open two cursors with WITH HOLD
Reply with quote

Hi
thanx for clearing my doubt.
But can we open two cursors on same table in the same program.
thanx in advance.
Back to top
View user's profile Send private message
Pushpak

New User


Joined: 06 May 2005
Posts: 22

PostPosted: Thu Jun 09, 2005 1:36 pm    Post subject: Re: Is it possible to open two cursors with WITH HOLD
Reply with quote

Hi,

DB2-SQL provided very good features, like JOIN,UNION,Subqueries, Corelated subqueries & so on, for developers to combine two diff/same tables & get the results.

You don't need to try two cursors on same table in same program, instead you can use any of the above features to satisfy your requirement.

Pushpak.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1