Quote:
|
Originally Posted by JamesAvery22
Is there a way to check to see if a row with the say primary key is already in the aud table before doing the insert? So if the key already exsists then update that document instead of trying to perform the insert?
|
Perhaps you should not use the same PK in the mirror table, but eg the PK in combination with the timestamp of the INSERT/UPDATE operation. That way you can really monitor
all the events on your base table.
I would create a mirror table with all the columns of the base table and an identity column (and a timestamp field if needed).
The identity column will provide a PK and a sequence of the operations on the base table (the timestamp field will make it easy to determine when there were bursts of activity).