Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server 7.0 Triggers
Message
From
14/03/2000 00:37:32
 
 
To
13/03/2000 18:17:31
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00344975
Message ID:
00345227
Views:
18
This works only if the sql command modified a single record.

Vlad

>In the trigger declare old and new values
>
>DECLARE @oldvalue int,@newvalue int
>
>SELECT @oldvalue = (SELECT columnname from deleted)
>
>SELECT @newvalue = (SELECT columnname from inserted)
>
>Now use the @oldvalue and @newvalue in your calculations
>
>HTH
>John
>
>
>>Does anyone know if it's easy to reference both old and new field values via triggers in SQL Server 7.0. e.g. If I was amending a balance detail record and changing the ordered quantity from 10 to 20, I would would want to update the ordered quantity on the balance header record by the (current header value + (new detail value - old detail value)) hence I would need to know what the new and old balance detail ordered quantities were. Thanks.
Previous
Reply
Map
View

Click here to load this message in the networking platform