• Yes you could and should re-write the trigger, but not just because of the error message, which you get whenever you have a rollback in a trigger, there's no way to avoid the message you just need to expect it.

    The reason you should re-write the trigger is because it cannot handle a set-based update. It assumes that there will NEVER be a case where multiple rows will be updated by a statement. I suggest you read this article, http://www.sqlservercentral.com/articles/Triggers/64214/, which explains more about what I'm saying here.

    In this case I think your best option is to use an INSTEAD OF trigger instead of the default AFTER trigger. So you're trigger would look something like this:

    CREATE TRIGGER [dbo].[TRG_PreserveActiveStatus] ON [dbo].[FD__MEDICATIONORDERS]

    INSTEAD OF UPDATE

    AS

    BEGIN;

    SET NOCOUNT ON;

    /* This trigger only UPDATES dbo.FD__MEDICATIONORDERS when the status isn't back to pending and noted is not 'T' */

    UPDATE dbo.FD__MEDICATIONORDERS

    SET STATUS = I.STATUS, column1 = I.column1, ...

    FROM

    INSERTED AS I

    WHERE

    dbo.FD__MEDICATIONORDERS.PrimaryKey = I.PrimaryKey AND

    I.STATUS <> 'Pending' AND I.NOTED <> 'T' ;

    END;

    I probably didn't get the logic right, but basically what happens is that when an update is issued the code in the trigger replaces what actually happens in the update, so you just need the where clause to EXCLUDE those rows that are being updated that would violate the business rules.