Asked by:
Fire triggers when rows are being inserted by sqlbulkcopy

Question
-
I am using sqlbulkcopy to insert bulk data into the sql database. But sometimes I may get duplicate values at that time I have to update than inserting a new data. I wrote insert triggers to to this task. But while using sql bulk copy class, it triggers only once after inserting all the rows. so duplicate occurs. Anybody help me in this? I have to fire my insert trigger everytime the row is being inserted.
All replies
-
One method is to let bulkcopy doing its job and later clean up the data.. Or using SSIS package and add a 'filter' fo duplicate checking
Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/ -
Hi Akitha,
This is not the Correct forum.
Kindly Post your Question Here :
http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/threads
Rakesh M J
Dont forget to mark it as Answered if found useful
MCTS,MCITP,MCSS
-
-
Hi akita,
Have you solve your issue following Peja's reply at this link http://social.technet.microsoft.com/Forums/en-US/sqldatabaseengine/thread/706992f3-4f7b-4d49-bbe3-0b286dde48ac please give his a feedback.
This is the forum of Reporting Services, you are welcome if you have any question about this category's issue at any time.
Thanks,
Challen Fu
Please remember to mark the replies as answers if they help and unmark them if they provide no help.