SQL Server 2005 Mass update/insert help
Posted on 2009-05-13
I'm working with SQL Server 2005 and I have to develop a process that would compare records in a stagging table with that in production. The process would update the records if they exist, but insert them if they don't. I'm struggling in deciding wether the best method is to use a stored procedure or trigger. The staging table will contain tens of thousands of records that will be used to update/insert into multiple production tables. Does anyone have a best method approach or recommendation as well as some examples to get me pointed in the right direction? I really appreciate any help. Thanks.