Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
>>Sorry, SQL Server 7 doesn't have that and I've not heard about anything on those lines in SQL Server 2000 (unless you write your own function called TriggerEvent < s >).
>>
>>In your design, do you have to incorporate all trigger functionality into one trigger? Or can you separate it into multiple triggers, each called for the individual purpose (insert, delete, update)?
>
>well - the problem is that 90% of the code for the two is the same, and I wanted to just manage the 10% in the trigger without having to duplicate so much stuff in two separate triggers
>
>Thanks!
Ken,
You can create an SP that has the 90%, then call it from each of your triggers. Main problem here is the SP you call from the trigger won't have access to the inserted/deleted tables.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement