title: Need help on simple pivot
body: <p>Newbie to SQL and doing some exercises having trouble with a simple pivot</p>
  
  <p>I have a table,</p>
  
  <pre><code>Labnumber : Silicon : Aluminum : Magnesium
  9086-1    :  7.05   :    15    :    .7   
  </code></pre>
  
  <p>What I need is :</p>
  
  <pre><code>labnumber   9086-1 
  Silicon      7.05 
  Aluminum     .15 
  Magnesium    .7
  </code></pre>
  
  <p>I have played around with the pivot command </p>
  
  <pre><code>SELECT LabNumber,ElementFROM XRF UNPIVOT ( labnumber1 for Element in(Silicon,Aluminum,Calcium,Magnesium) )As test
  </code></pre>
  
  <p>But all i get is this</p>
  
  <pre><code>LabNumber Element 
  9086-1    Silicon 
  9086-1    Aluminum 
  9086-1    Calcium 
  9086-1    Magnesium
  </code></pre>