Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-12-07 : 09:24:30
|
| rh writes "Is there any option to create multiple (update) triggers on one table that fire in a predefined order? I read about nested triggers but they don't meet my needs.Let's say I want to fire an event on TABLE1 and TABLE2 when an update on TABLE1 has occured. The thing is, TABLE1 and TABLE2 are related and I have to fire an event on TABLE1 first before firing an event on TABLE2. I know that I can merge those two events in one trigger, but because the sql is so large it would be "cleaner" to put it into two (order sensitive) triggers.Is there any way? Thanks." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2001-12-07 : 09:39:17
|
| If you absolutely, positively have to guarantee a specific order of execution, the only reliable way is to put all of the code in one trigger. To make life easier, you could put sections of code into separate stored procedures and call them from the trigger, but you can't use the inserted and deleted tables in a separate SP. |
 |
|
|
|
|
|