>I need to track changes / history of a user table. I have created a history table, and would like to put a trigger on the table to be tracked, inserting into the history table those columns which are modified each time. I can create the trigger with a number of 'IF UPDATE (column)' statements, but was wanting a more elegant way of doing this. Any suggestions?? As always, any help is greatly appreciated.
You can write a program/script that would generate a trigger for you. This way you simply regenerate a trigger every time table changes or use it for any other table. There're also commercial products that you can use, for example Apex SQL Audit
http://www.apexsql.com/sql_tools_audit.asp>P.s. - this table should be modified one row at a time. There should not be any bulk inserts.
I wouldn't assume that. The trigger should be designed to work properly in both scenarios.
--sb--