Hello,
is there any chance of creating a trigger like this one:
CREATE TRIGGER tri_Test ON TESTTABLE FOR UPDATE NOT FOR REPLICATION AS
SET NOCOUNT ON
BEGIN
DECLARE @Field1 varchar(31)
DECLARE @Field2 bigint
SELECT @Field1 = Field1 FROM inserted;
SELECT @Field2 = Field2 FROM inserted;
INSERT INTO NEWTABLE (Field1,Field2)
VALUES (@Field1, @Field2)
END
GO
for multiple Rows in "inserted" but
without the use of a cursor?
I googled a lot and played with WHILE and @@rowcount but could not find a solution yet.
A sample would be nice.
EDIT:
my goal is not to "mirror" the tables.
thank you