title: SQL Server: How would I normalize data tables?
body: <p>I have a table with 3 columns that need to be moved to another table and replaced with the IdentityID of the inserted row in the other table.</p>
  
  <p><a href="http://sqlfiddle.com/#!6/eba8a" rel="nofollow noreferrer">Here</a> is the SQLFiddle of the basic idea I'm trying to work with:</p>
  
  <pre><code>CREATE TABLE RECORD 
  (
    ID int,
    ObjectDetail_A int,
    ObjectDetail_B int,
    ObjectDetail_C int,
    ObjectDetailID int
  )
  
  CREATE TABLE OBJECTDETAIL
  (
    ID int,
    ObjectDetail_A int,
    ObjectDetail_B int,
    ObjectDetail_C int
  )
  </code></pre>
  
  <p>So in the end, fields ObjectDetail_A, ObjectDetail_B, and ObjectDetail_C are replaced with the ID of the OBJECTDETAIL table when the data is inserted into that table.</p>
  
  <p>I'm just a little confused into how to insert a row into destination table and then update the source table with the destination identity.</p>
  
  <p>Any help would be much appreciated,  </p>
  
  <p>Thanks</p>