Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieve changed values from audit table

 
saivenu madhav
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have audit table for each table, like USERS table audit table is USERS_ADT table which has all changes for each record in USERS table

I need to get only changed values for USERS table from USERS_ADT.

lets suppose, i have fields called firstname,lastname & email in USERS table.

i have fields in USERS_ADT are firstname,lastname & email & lastupdate


Depends on lastupdate value,


i want the following values

field newvalue oldvalue updateddate

firstname "madhav" "ram" "13-oct-08"
lastname "changala" "kothha" "14-oct=08"
email "madaj@gai.com" "asda@tcs.com" "15-oct-08"


Could you any get the solution for this

Regards
Madhav
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you any get the solution for this
It can't be done this way. There is no foreign key in the audit table that shows what record in your user table has been changed.

Regards, Jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic