Trigger to find which fields were changed on update

  • I am trying to create a trigger so that on an Update action the trigger will insert the name of the fields that were changed into one field in an audit table.  For example in table 1 if the city and state fields were changed it would then insert 'city, state' into the 'FieldsChanged' column in my audit table.  FYI, some of my tables have up to 15 columns.  Any help would be appreciated.

     

    Thanks 

  • Do a forum search here. This topic has been discussed here many times recently.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply