title: SQL Server - copy data from staging table
body: <p>I am using staging tables to perform validation and insert into live.</p>
  
  <p>Suppose I have a table <strong>PERSONS</strong></p>
  
  <pre><code>TABLE Persons
  (
  Id int NOT NULL,
  LastName varchar(255) NOT NULL,
  FirstName varchar(255),
  HouseNumber int,
  )
  </code></pre>
  
  <p>and a <strong>STAGING TABLE</strong> as follows</p>
  
  <pre><code>TABLE Persons_Staging
  (
  Id int NOT NULL,
  LastName varchar(255) NOT NULL,
  FirstName varchar(255),
  HouseNumber varchar(255),
  )
  </code></pre>
  
  <p>I need to write a procedure to transfer data from the <strong>staging table</strong> to the <strong>live table</strong> while ensuring no duplicates are inserted. How can I achieve that?</p>
  
  <p>Thanks in advance</p>