Below is an AFTER UPDATE TRIGGER. The actual trigger includes 32 columns. the trigger works, but is there a way to only update the columns that have been changed? One option is to use a WHERE clause of:
WHERE (isnull(Ins.ColumnName,'') <> isnull(Del.ColumnName,'')).
I assume I would have to put this where statement in for each of the 32 columns and have 32 queries. Is there another way?
UPDATE Visit SET
PerID = Ins.PerID,
PatFName = Ins.PatFName,
... 30 other column names
INNER JOIN Inserted As Ins ON Visit.[VisitID] = Ins.[VisitID]