title: Import Unpivot results to new Table and match on Key
body: <p>I currently have a few unpivot queries that yeilds about 2000 rows each. I need to take the results of those queires, and put in a new table to match on a key.</p>
  
  <p>Query Example:</p>
  
  <pre><code>Select DeviceSlot
    FROM tbl1
    unpivot(
    DeviceSlot
    For col in(
         col1,
         col2,
         col3,
    )
    )AS Unpivot
  </code></pre>
  
  <p>Now I need to match the results from the query, and insert it into a new table with about 20,000 rows. 
  Pseudo-Code for this:</p>
  
  <pre><code>Insert Into tbl2(DeviceSlot)
    Select DeviceSlot
    FROM tbl1
    unpivot(
    DeviceSlot
    For col in(
         col1,
         col2,
         col3
    )
    )AS Unpivot2
    Where tbl1.key = tbl2.key
  </code></pre>
  
  <p>I've been pretty confused on how to do this, and I apologize if it is not clear.
  I also have another unpivot query doing the same thing for different columns.</p>