Posted by Anith Sen on 11/07/06 15:20
You can look up SQL Server Books Online to learn how to write a trigger in
t-SQL. You'll need to utilize the inserted/deleted virtual tables to
accomodate multi-row inserts. The update statement will be something along
the lines of:
UPDATE tableX
SET y = B
WHERE EXISTS ( SELECT *
FROM inserted i
WHERE i.key_col = tableX.key_col
AND inserted.x > 1000000 ) ;
Here key_col is any column or set of columns that can uniquely identify a
row in tableX.
--
Anith
Navigation:
[Reply to this message]
|