Have a question. I have two statements as below:
Statement #1
Insert into tblAudit (Col1, Col2)
Select Col1, Col2 From tblSoruce
Where "Same Condition"
Statement #2
Delete from tblSource
Where "Same Condition"
I am trying to first put in an audit table, all the rows that are being deleted later.
What is the best way to accomplish this without "missing" any rows in between the 2 statements?
In the way I have the SQL statements, the number of rows can change from the first to the second statement, which is not what I want. (I can't use the OUTPUT clause as there are FK relationships)
Any help in how to accomplish this in a more efficient manner (without temp tables)
Thanks.