Trigger to compare incoming record w/ previous record

  • I think Sergiy was just giving a word of caution, to make sure to include the join. I looked at the original code I posted, and I also have an equajoin. And no, there can't be more than one poid in inserted or deleted (in my case).

    I also want to make something else clear, incase someone else was confused like I was. That msdn article I quoted earlier says this, "[The inserted and deleted] tables are used to store the before and after state of the table...". That is kind of ambiguous, because I thought it meant deleted contains the entire table before any updates were made. Well I did some testing, and deleted/inserted only contain the result set of affected rows from your update statement. If you update 1 row, there's only one row. If your update affects 10 rows, deleted has the previous state of those 10 rows, and nothing else.

Viewing post 16 (of 15 total)

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