Ah, I wouldn't do it like that!I'd use the "before" and "after" to work out by how much that single transaction had changed, and adjust the Balance by that amount.CREATE TRIGGER MyTriggerON MyTransactionTableAFTER INSERT, UPDATE, DELETEASUPDATE ASET MyBalance = COALESCE(A.MyBalance, 0) + COALESCE(I.MyAmount, 0) - COALESCE(D.MyAmount, 0)FROM MyTransactionTable T JOIN MyAccountTable A ON A.MyAccountCode = T.MyAccountCode LEFT OUTER JOIN inserted I ON I.MyPK = T.MyPK LEFT OUTER JOIN deleted I ON D.MyPK = T.MyPK
EDIT: There might be an issue if there were two transactions for the same account in the same update batch - you'd need some sort of GROUP BY to take care of thatKristen