title: Skip insert (and continue) on duplicate key [T-SQL]
body: <p>I'm trying to get a working solution for a arguably pretty simple task:</p>
  
  <p>I have a simple query like this:</p>
  
  <pre><code>INSERT INTO [INTRANET].[dbo].[SOME_STATUS]
     ([AUS_STATUS_VID]
    ,[AUS_STATUS_STATUS]
    ,[AUS_STATUS_JAHR]
    ,[AUS_STAUTS_END]
   )
  
  SELECT DISTINCT CD_CLVID, '1', '2017', '0'
  FROM [SNTRANET].[dbo].[SOME_DETAILS]
  WHERE CD_JAHR = 2017     
  </code></pre>
  
  <p>Long story short: Filling up a table with results from another table. Now it seems like, that I have inconsistent data given to me. I was trying to find a solution similar to <code>replace into</code> or <code>on duplicate key update</code> (which I was used to from MySQL). However, T-SQL doesn't seem to have this. </p>
  
  <p>Is there an easy solution which just skips the dupe key and continues with the rest of the resultset? </p>
  
  <p>I'm using SQLServer 2008 R2</p>
  
  <p><strong>Edit 1</strong></p>
  
  <p>As requested, the error-message:</p>
  
  <blockquote>
    <p>Violation of PRIMARY KEY constraint 'PK_T_KB_AUSZAHLUNG_STATUS'. Cannot insert duplicate key in object 'dbo.T_KB_AUSZAHLUNG_STATUS'. The duplicate key value is (7463).</p>
  </blockquote>