I have a table that constantly has rows inserted, and one of the fields is always empty. I want to create an Insert trigger on the table and populate the empty field with data extracted from several of the other fields.
CREATE TRIGGER tr_PutInValue ON MyTable
set EmptyField = DataField1 + ':' + DataField2 + ':' + GetDate()
But when I try to create this trigger, SQL tells me
Server: Msg 286, Level 16, State 1, Procedure trI_syslog, Line 119
The logical tables INSERTED and DELETED cannot be updated.
If I can't modify values in the Inserted table, then how can I achieve what I want?