Alexey T wrote:
Oh.
Thanks, but I'm confused. 🙂
At first you seemed to be talking about a trigger, now about a script. I don't know where to run it yet.
I'm sorry I used the term script, but I should have used the term statement. The trigger should be like this:
CREATE TRIGGER mytrigger ON [tblAssets]
AFTER UPDATE AS
BEGIN
Update [tblAssets]
Set [Description] = [Description] + ' used by ' + Userdomain + '\' + Username
where Userdomain is not null and Username is not null and Description not like '% used by ' + Userdomain + '\' + Username
END