aspose file tools*
The moose likes JDBC and the fly likes Retrieve changed values from audit table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Retrieve changed values from audit table" Watch "Retrieve changed values from audit table" New topic
Author

Retrieve changed values from audit table

saivenu madhav
Greenhorn

Joined: Nov 15, 2007
Posts: 29
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

Joined: Dec 20, 2006
Posts: 2503
    
    8

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


OCUP UML fundamental and ITIL foundation
youtube channel
 
Don't get me started about those stupid light bulbs.
 
subject: Retrieve changed values from audit table