Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DateTime Stamp a Record
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01193569
Message ID:
01194363
Vues:
24
Appreciate the example. Does the update fire this trigger once more? What causes this not get into an indefinite loop (nesting)?

>This might help:
>
>
>create trigger <trigger name> ON <table>
>for update
>as
>begin
>    -- exit trigger if update is on LastUpdate field
>    if update(LastUpdate)
>            return
>
>    -- get key field to use for filter
>    declare @lckey char(20)
>    select @lckey = <key field> from inserted
>    update custFL set LastUpdate = GetDate() where <key field> = @lckey
>end
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform