• lawlietdba (1/27/2015)


    David Burrows (1/26/2015)


    If a row is inserted and then deleted the audit view needs to duplicate the audit row if insert and delete is required to be shown separately.

    Hi Jeff,

    Is this a concern to be taken for consideration on the new trigger ...?

    Do we have to show the insert and delete separately.

    Creating a UNION ALL query as you as you advised should suffice right..?

    Please clarify

    You already know the answer to this. How did I say INSERTs would be audited? Do you remember any certain columns that I was making absolutely sure got populated in the Employee table? And how much of the data was changed if we did an insert of a row, did [font="Arial Black"]no [/font]updates, and then did a delete? Is there anything on that single deleted row that's different than it was when it was first inserted and is there anything on that row that tells you when it was first inserted. Think about it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)