Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Deal All,I am trying to write a trigger that will import information from one table to the other. This trigger is meant to fire whenever a specific data is entered into one of the columns in the source table. Could any one help .Thanks in Advace.V David
OMB
Yak Posting Veteran
88 Posts
Posted - 2002-05-27 : 06:19:09
Easy VictorYour old chum here try this:
CREATE TRIGGER triggername ON [your table] FOR INSERT, UPDATEASBEGINif update (your column)INSERT (Your table 2 (column1,column2,ect....)SELECT (column1,column2,etc..)FROM Inserted ENDgo
HanifEdited by - omb on 05/27/2002 06:23:07Edited by - omb on 05/27/2002 06:25:53