How to Track Number of Changes Occured in a Column? T-SQL - SQL Server

Posted by user327387 on Stack Overflow See other posts from Stack Overflow or by user327387
Published on 2010-04-29T11:41:00Z Indexed on 2010/04/29 11:47 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

For example, i have a column named EmployeeName.

Every time a user changes/fix his name, i need to keep a count. If he changes his name twice, then count is 2. Also, i need to store the time of every change employee makes on EmployeeName e.g. if the name essentially is James and time created is 9:00 AM and then employee changes to John on 11:00 AM, i need to preserve this new time and new value as well as the previous one which is James at 9:00 AM.

I hope its clear! Thank you guys...Best Answer will be chosen...

If this requires a trigger, giving a sketchy pseudo-code will be very much appreciated.

© Stack Overflow or respective owner

Related posts about t-sql

Related posts about sql