I have a trigger in a database.
CREATE TRIGGER trigg_varer_ledit_iu
ON items
FOR INSERT, UPDATE
AS
BEGIN
UPDATE items
SET lastedit = GETDATE()
WHERE itemnr IN (SELECT
itemnr
FROM inserted)
END;
It works good. Every time I update and insert new data to items the "lastEdit" field is updated.
But: I have some spesific fields in that table that should NOT trigger to update this lastEdit field. How can I achieve that?
Now it works for every fields that is updated. I need to keep some of them out of the circus.