June 17, 2005 at 9:37 am
Probably not a bright question but is there a rule of thumb not to have multiple FOR UPDATE triggers on a table? I am working with a third party software where I would like to do auditing BEFORE and AFTER snapshots. There is an existing trigger from the software company with a FOR UPDATE for the lastupdate date etc but I want something more detailed like what columns actually changed, not only the dates. For testing purposes, I altered their trigger that came with the app and it works fine. I put a second FOR UPDATE trigger in there and I get bad results. Any expereince/suggestions?
June 17, 2005 at 9:48 am
You can add another update trigger if you want. But I would make sure that it fires after the first one. Look up sp_settriggerorder in bols for more details.
Maybe that'll solve your problem.
June 17, 2005 at 9:49 am
Just forgot something... make sure that the trigger only fires on the first update. I assume here that you are updating a column in the same table where the first update that triggered the trigger was made. That could also be causing you some headaches.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply