inserting last record....

  • Hi TNT -

    Basic rule of thumb for a trigger is that it fires once per statement - NOT once per row.  That's why in many triggers you often see a test for @@ROWCOUNT.  Bottom line: INSERT one row and your trigger will work the way you expect.  But - INSERT ... SELECT - she's not gonna work! 

    Maybe you can factor your logic up into a sp that uses (gasp!) a cursor - then feed your inserts one at a time.

    Good Luck.


    Mike at the Mill

  • Oops, thanks Mike, meant once per statement when I said per transaction.

  • thanx alot for your help guys...

    i've decided to go with the easy option and enter record by record rather than SELECT..INSERT ...

     

    cheers,

    TNT

Viewing 3 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply