I have a user table 'tbl_user' with some columns like:
USER_ID
USER_FNAME
USER_LNAME
USER_GENDER
USER_DOB
USER_CAHANGE_DATE ...etc...
I have created a trigger on this table so that when ever a value for a user is updated then I am storing that value with filed name into the transaction table like below:
USER_ID FIELD_NAME PREVIOUS_DATA UPDATED_DATA USER_CHANGE_DATE
1 USER_FNAME test test1 06/26/2013
1 USER_GENDER M F 04/26/2013
2 USER_DOB 01/01/2001 01/01/2002 03/01/2013
SO now, when user 2 want to see the actual data on 03/01/2013 I should display the data from tbl_user and join this transaction table to get the field values on or before 03/01/2013. In this case everything will be from tbl_user except USER_DOB is changed on 03/01/2013.
Can somebody help what is the best way to do it. I just need the method of developing, i don't need any queries.
Thanks