'NOT WORKING AFTER INSERT TRIGGER - SYNTAX CHECK
I want to insert new rows in table T1 to another table T2, only when a condition on one field matches.
I've created and run the next script
CREATE TRIGGER trig_1
ON T1
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
SELECT *
INTO T2
FROM inserted
WHERE field_n in (9,10,11,12,13,51,193)
END
GO
I'm not seeing any insert on T2 but I know that there are inserts ocurring on T1 with the required condition. Also, I'm trying to avoid declaring temp variables because t1 has 81 fields, and I want them all to be inserted on T2.
Any help on this?
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
