sql bulk insert : I am having 1 million of data in a file, I want to insert all the records into the mssql server. While inserting I am doing some comparison with existing data on the server, if the comparison satisfied I will update the existing records in the server or else I will insert the record from the file. I'm currently doing this by looping from c#, which consume more than 3 hours to complete the work. Can anyone suggest idea to improve the performance.

Thanks,
Xavier.