title: Trying to copy one table from another database to another in SQL Server 2008 R2
body: <p>i am trying to copy table information from a backup dummy database to our live sql database(as an accident happened in our program, Visma Business, where someone managed to overwrite 1300 customer names) but i am having a hard time figuring out the perfect code for this, i've looked around and yes there are several similar problems, but i just can't get this to work even though i've tried different solutions.</p>
  
  <p>Here is the simple code i used last time, in theory all i need is the equivilant of mysqls On Duplicate, which would be MERGE on SQL server? I just didn't quite know what to write to get that merge to work.</p>
  
  <pre><code>INSERT [F0001].[dbo].[Actor]
  SELECT * FROM [FDummy].[dbo].[Actor]
  </code></pre>
  
  <p>The error message i get with this is:
  Violation of PRIMARY KEY constraint 'PK__Actor'. Cannot insert duplicate key in object 'dbo.Actor'.</p>