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

How to retrieve the updated rows from employee table


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 677
Location: NJ

PostPosted: Thu Dec 22, 2005 3:47 pm
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
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
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: 677
Location: NJ

PostPosted: Fri Dec 23, 2005 3:13 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top