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
 
DB2 Interview question at HSBC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions
Author Message
prasadk432

New User


Joined: 22 Dec 2007
Posts: 9
Location: Gurgaon

PostPosted: Wed Feb 06, 2008 4:41 pm    Post subject: DB2 Interview question at HSBC
Reply with quote

In cursors after fetch statement in procedure division if you code count() whether the data updated in latest query can be accessible or not.
Back to top
View user's profile Send private message
References
PostPosted: Wed Feb 06, 2008 4:41 pm    Post subject: Re: DB2 Interview question at HSBC Reply with quote

Moved: Wed Feb 06, 2008 5:00 pm by William Thompson From DB2 to Interview Questions
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 6756
Location: 221 B Baker St

PostPosted: Wed Feb 06, 2008 9:56 pm    Post subject:
Reply with quote

Hello,

Please re-word your question.

The posted question is not clear (at least not to me icon_smile.gif ).

Please keep in mind that while your question is completely clear to you, it may not be to others who read the question.
Back to top
View user's profile Send private message
prasadk432

New User


Joined: 22 Dec 2007
Posts: 9
Location: Gurgaon

PostPosted: Tue Feb 12, 2008 12:46 pm    Post subject:
Reply with quote

Yes Dick,

I was asked after fetch statement in cursor if you code count statement whether you can access last updated data or not.Please give the solution
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Tue Feb 12, 2008 12:59 pm    Post subject:
Reply with quote

Hi,

You are confused with the Questions.

How can a Fetch stmt will update a table.

or You mean you have declared a cursor with delete and trying to find count the number of rows after delete.


Cheers
Ashwin
Back to top
View user's profile Send private message
prasadk432

New User


Joined: 22 Dec 2007
Posts: 9
Location: Gurgaon

PostPosted: Tue Feb 12, 2008 1:08 pm    Post subject:
Reply with quote

Not like that update stmt would be issued before fetch and that updated data can be accessed after some fetch and count stmt or not.

Now I think it is clear.
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Tue Feb 12, 2008 3:58 pm    Post subject:
Reply with quote

Hi,

Either you update the Table before fetch or after, it doesn't impact the Count in Table.

As far as i know the count will only differ from the original value when you either delete or insert a row.

Hope this Helps!

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