title: How to pivot a field into two seperate fields based on condition
body: <p>I'm looking for some assistance with the following issue. I am looking for the the most elegant way to do this, as my current method really is not nice, at all. Any help would be greatly appreciated :</p>
  
  <p>I have this:</p>
  
  <pre><code>cnumber     cid         prim
  n100        123123      y         
  n100        465488      n         
  n123        798         y         
  n768        544         y         
  n455        123         y         
  n455        098         n       
  </code></pre>
  
  <p>I am looking to get this:</p>
  
  <pre><code>cnumber     y           n         
  n100        123123      465488
  n123        798         NULL
  n768        544         NULL
  n455        123         98
  </code></pre>