• Now, I told you that story to tell you this one.  Consider the links that Evgeny Garaev provided above.  The cool part about the Temporal Tables is that they auto-magically include columns that support Type 6 SCDs (Slowly Changing Dimensions).  AND... They only audit changes, not INSERTs.  Please see the following article on SCDs.

    https://en.wikipedia.org/wiki/Slowly_changing_dimension

    The bad part is that they are not without caveats (no auditing system is, especially when schema changes take place).  Another really good part is that auditors love Temporal Tables because they very difficult to tamper with.  Like I said, though... caveats... make sure that you read ALL the links in the article that Evgeny Garaev provided the link for before you think of using them or things like the system automatically deleting your hard earned history just might take you by surprise.

    --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)