How to Track Number of Changes Occured in a Column? T-SQL - SQL Server
- by user327387
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.