UPDATE Trigger fires on INSERT ????

  • Hello... Me again...

    Why do UPDATE Triggers fire when a row is INSERTed ???

    I'm trying to keep an audit trail and log the different events. i.e. - I want to distinguish an INSERT from an UPDATE in an audit table.

    But - the UPDATE fires on every INSERT as well so every insert has 2 events - an INSERT *and* an UPDATE.

    Not really THAT big of a deal - but it's redundant and generally irritating.

    Any ideas ??

  • Do you have an INSERT trigger that does an UPDATE?

  • No... but an insert(into another table)

    To clarify...

    Two Tables:

    1) People

    2) EventLogOfPeopleEdits

    Two Triggers

    1) INSERT on People

    2) UPDATE on People

    *NOTE* NO triggers on the Audit table

    Whenever the People table is edited (INSERT or UPDATE) - the event' occurance is "Inserted" into the audit table.

    That's it...

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

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