title: Cannot insert duplicate key row in object with unique index 'SAXXIRPT while updating
body: <p>I am writing a SQL statement to update a table in SQL from a temp table. I keep getting this error message: <code>Cannot insert duplicate key row in object with unique index 'SAXXIRPT'</code>.</p>
  
  <p>Here is my update statement: </p>
  
  <pre><code>Update dbo.sat_ser_rpt_itm
  SET itm_key_cd = n.itm_key_cd,
    itm_typ_cd  = n.itm_typ_cd,
    ser_id  = n.ser_id ,
    as_of_dt = n.as_of_dt,
    ocrn_nr  = n.ocrn_nr ,
    id_rssd = n.id_rssd,
    ocrn_day_txt = n.ocrn_day_txt ,
    ocrn_dt = n.ocrn_dt ,
    hol_flg = n.hol_flg ,
    ocrn_val_nr = n.ocrn_val_nr 
    from #LookupTable n
    on sat_ser_rpt_itm.id_rssd = n.id_rssd 
  AND sat_ser_rpt_itm.as_of_dt = n.as_of_dt 
  AND sat_ser_rpt_itm.ser_id = n.ser_id 
  and sat_ser_rpt_itm.itm_typ_cd = n.itm_typ_cd 
  and sat_ser_rpt_itm.ocrn_nr = n.ocrn_nr 
  where t.id_rssd is not null and  t.as_of_dt is not null  and  t.ser_id is not null and  t.itm_typ_cd is not null and t.ocrn_nr is not null  
  </code></pre>
  
  <p>These are my indexes (clustered):</p>
  
  <pre><code>id_rssd, as_of_dt, ser_id, itm_key_cd and ocrn_nr
  </code></pre>
  
  <p>What's causing this error message?</p>