Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create a trigger that updates other fields?
Message
 
 
À
17/09/2002 19:11:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00701566
Message ID:
00701593
Vues:
20
Hi Luis,

Funny, I asked today the same question. You can not Update the same table with the triggers, but you can use Table Rule for such update. For instance, I use UpdateModidate() function, which just has replace Modidate with datetime()

See Re: Triggers Thread #701299 Message #701326 for more discussion...

>Hi friends, I have a very a question: How can I create a trigger that updates other fields in the same table? I mean, I know (but I'm not sure ;)) that I must create an update-trigger (a trigger that executes whenever a tables has been updated, sorry for my english) but I never created a trigger so I would like any of you to help me create one. My problem is that I need to record on two fields (cUserModified and cDatetimeModified) the user and datetime that the data on the record was last modified. My VFP app uses a DSN connection with Windows NT autentication (trust connection) so SQL Server knows already who is accessing data.
>
>Any help would be useful.
>
>TIA
>
>Luis
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform