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
 

 

How to retrieve the updated rows from employee table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
deva

New User


Joined: 03 Nov 2005
Posts: 19

PostPosted: Thu Dec 22, 2005 3:45 pm    Post subject: How to retrieve the updated rows from employee table
Reply with quote

hi

I have one employee table if i updated the table now how to retrieve the updated rows from employee table
Back to top
View user's profile Send private message

khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Dec 22, 2005 3:47 pm    Post subject: Update query
Reply with quote

Hi Deva,
Quote:
I have one employee table if i updated the table now how to retrieve the updated rows from employee table

since the updation to take in effect u should refresh the table.. once the select or any other command is used in the mean the table get refreshed. so for ur case u can use the select command in order to get the effect..
Back to top
View user's profile Send private message
deva

New User


Joined: 03 Nov 2005
Posts: 19

PostPosted: Fri Dec 23, 2005 2:39 pm    Post subject:
Reply with quote

Hi khamaurutheen,


my question is how to retrieve only last updated rows.
Back to top
View user's profile Send private message
akashs

New User


Joined: 24 Nov 2005
Posts: 49
Location: chennai

PostPosted: Fri Dec 23, 2005 2:49 pm    Post subject: Re: interview question
Reply with quote

we use SQLERRD(3) , to find how many rows have updated....but i dont know how to retreive the updated rows...

regards,
akash
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Fri Dec 23, 2005 3:13 pm    Post subject: Update query
Reply with quote

Hi deva,

i think u can add a TIMESTAMP or TIMESTAMP WITH TIME ZONE column to the table . and using that u can retrive the updated row.. i don't think there will b any other way... let me c.....
Back to top
View user's profile Send private message
prasad43

New User


Joined: 21 Oct 2005
Posts: 7
Location: blore

PostPosted: Tue Dec 27, 2005 1:45 pm    Post subject:
Reply with quote

Hi,
in vsam we cannot apply conditions to any fields or any files,and it is some what cost that's why better to use sql.

Regards,
PRASAD DAGGUBATI
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Wed Dec 28, 2005 1:51 pm    Post subject: Re: interview question
Reply with quote

Hi Guys,

The only possible way in DB2 to get the previously updated rows (provided no Timestamp field is available or modified by the previous query) is to analyse the DB2 catalog.The tool Log Analyser is used for the same purpose.

Thanks,
Nikhil .S.
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 -> Mainframe Interview Questions 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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 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 Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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