Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DateTime Stamp a Record
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01193569
Message ID:
01194363
Views:
26
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
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform