Reputation: 19790
I have added a insert/update trigger to a table that already has some rows. What is the cleanest way to execute the new insert/update trigger on the existing rows?
(Dirty idea is to modify some column and revert it in a transaction. Or add temporarily a column a change its data.)
Upvotes: 0
Views: 4293
Reputation:
Run an update statement that resembles what's in the trigger, without the join to inserted
. If you show the code in your trigger, we can help you more specifically.
Also, if you can explain why a no-up update wouldn't still fire the trigger, that would be great. If you currently check for actual changes in values, you could always alter the trigger temporarily to not bother doing that check.
Upvotes: 3