Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Trigger
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
SQL Trigger
Divers
Thread ID:
00227038
Message ID:
00227038
Vues:
71
I am attempting to create a SQL Trigger on a column when updating.

The following is incorrect:

CREATE TRIGGER cus_name
ON dbo.customertable
FOR UPDATE AS
IF UPDATE(cus_name)
INSERT INTO AUDITTABLE(AUD_TABLENAME,AUD_COLNAME,AUD_OLD,AUD_NEW,AUD_DATE,LANID,COMPNO)
VALUES ('customertable','cus_name',deleted.cus_name,inserted.cus_name,GETDATE(),inserted.lanid,inserted.compno)


Does anybody know the correct way?
Richard DeZeeuw
DeZeeuw Software Inc.
Répondre
Fil
Voir

Click here to load this message in the networking platform