title: Insert Trigger does not work on bulk insert; trigger is working with cursor
body: <p>On bulk insert, Insert trigger only works for the first record and does not work for all the other records but trigger works properly when records are inserted using cursor.</p>
  
  <p>Insert trigger updates few columns of destination table. To insert bulk data I am using following script</p>
  
  <pre><code>INSERT INTO DestinationTable (Column1, Column2)
  SELECT * FROM SourceTable
  </code></pre>
  
  <p>I get few columns in trigger of inserted record like the following script, and work on them to update columns of DestinationTable</p>
  
  <pre><code>SELECT @col1 = Column1, @col2 = Column2, FROM INSERTED
  </code></pre>
  
  <ol>
  <li>Why on bulk insert, trigger does not
  work?</li>
  <li>Am I missing something or I have to
  use cursor?</li>
  </ol>
  
  <p>I am using SQLServer 2005</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Trigger Code</p>
  
  <p><a href="http://stashbox.org/957108/InsertTrigger.sql" rel="nofollow noreferrer"><a href="http://stashbox.org/957108/InsertTrigger.sql" rel="nofollow noreferrer">http://stashbox.org/957108/InsertTrigger.sql</a></a></p>
  
  <p>Thanks.</p>