Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trigger problem
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01391619
Message ID:
01391808
Vues:
47
Isn't it the same as
IF UPDATE(cs_enddate) 
in this case ?


>IF you didn't change cs_enddate from anywhere else but from DELETE trigger you could do this in UPDATE Trigger:
>
>IF EXISTS(SELECT 1 FROM INSERTED INNER JOIN DELETED ON Inserted.cs_enddate <> Deleted.cs_enddate)
>   BEGIN
>      --- cs_enddate is updated that means the trigger is fired from DELETE triger
>      RETURN
>   END
>.....
>
>
>But as I said, that is VALID only if you didn't change cs_enddate anywhere else but DELETE trigger.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform