SQL Server : trigger after transaction
<p>I have a trigger after update on table and there are 2 updates in one transaction. The trigger has been called after the first update. I expect, trigger view updates after whole transaction, but it is no true:</p>

<p>My transaction:</p>

<ol>
<li>update table</li>
<li>call trigger, trigger see update only from 1</li>
<li>update table</li>
<li>no call trigger, because update condition in 3 don't match</li>
</ol>

<p>It is possible to set trigger then trigger see data after transaction (from 1 as well as 3)?</p>

<p>My trigger:</p>

<pre><code>ALTER TRIGGER "dbo"."TRIGGER" 
ON TABLE
FOR UPDATE
AS
    IF (SELECT COUNT(*) FROM inserted i, deleted d
        WHERE d.aaa IS NULL 
          AND i.aaa IS NOT NULL 
          AND i.bbb IN ('0', '1', '6', '9')) &gt; 0
    BEGIN
        INSERT INTO export (aaa, ccc) 
            (SELECT aaa, ccc FROM inserted)
    END
</code></pre>

<p>Init data: <code>insert into TABLE(aaa,bbb,ccc) values(123,'N',100)</code></p>

<p>Updates:</p>

<pre><code>update TABLE set bbb = '0' where aaa = 123
update TABLE set ccc = 1 where aaa = 123
</code></pre>

<p>Expect: <code>insert into export(123,1)</code></p>

<p>But it calls: <code>insert into export(123,100)</code></p>