I have a trigger (code below) that works for some updates equal to the where statement but not all. Very new to triggers so I'm wondering if there are any initial things I need to look for.
CREATE TRIGGER tr_hold_complete ON CallsHistory
for INSERT AS
insert hold_complete
select ins.AddedDT, ins.fkey, ins.actiontext,
ins.subactiontext, con.emailaddress, ca.loggeddt,
(con.forename + ' ' + con.surname) as contactname,
ca.summary, ca.notes,co.coordinator, co.coordinator,getdate(), ca.status
FROM inserted as ins join calls as ca on
ins.fkey = ca.callid join contact as con on
ca.contactid = con.contactid join company as co on
ca.contactid = co.contactid
where ins.actiontext = 'hold' and ins.Subactiontext = 'completed'