I have insert records from excel sheet to SQL using SQLBulkCopy.
Code runs fine for me.
But I have to fire Trigger based insertion.
In trigger I am inserting records in another table based on Inserted
that also works fine.
but if I am checking that another table already having that record which I am trying to insert and update that record than that does not works for me.
How can I solve my problem ?
Use Merge statement in your Trigger if you are using SQL server 2008
Example: