GerryGoldberg
Technical User
- Apr 12, 2001
- 55
I am trying to write an insert trigger that will simply take the inserted row and insert it in another table. The trigger code is:
INSERT INTO tblHistory ( Client_ID,Visit_ID,Visit_Date)
SELECT i.client_ID,i.visit_ID,i.visit_Date FROM inserted i
I have tried many variations of this query but nothing works. I always get an error trying to insert into tblHistory. What am I doing wrong?
Gerry Goldberg
INSERT INTO tblHistory ( Client_ID,Visit_ID,Visit_Date)
SELECT i.client_ID,i.visit_ID,i.visit_Date FROM inserted i
I have tried many variations of this query but nothing works. I always get an error trying to insert into tblHistory. What am I doing wrong?
Gerry Goldberg