CREATE TRIGGER [TESTING] ON dbo.Table1
FOR INSERT, UPDATE
AS
DECLARE @testingTable1ID int
DECLARE @Data1 char(10)
SET @testingTable1ID = (SELECT testingTable1ID from inserted)
SET @Data1 = (SELECT TT1Data1 From Table1 where testingTable1ID = @testingTable1ID)
insert into Table2 (TT2Data1) values (@Data1)
--=============================
CREATE TRIGGER [TESTING2] ON dbo.Table2
FOR INSERT, UPDATE
AS
DECLARE @testingTable2ID int
DECLARE @Data2 char(10)
SET @testingTable2ID = (SELECT testingTable2ID from inserted)
update Table2
set TT2Data2 = 'whatever'
where testingTable2ID = @testingTable2ID
Thank You
Rollin Burr
Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.