title: SQL Server PIVOT perhaps?
body: <p><code>SELECT Name1, Name2, Value FROM mytable</code> gives me the following result set:</p>
  
  <pre>
  Name1 Name2 Value
  A     P1     1
  A     P2     1
  A     P3     2
  B     P1     3
  B     P2     1
  B     P4     1
  </pre>
  
  <p>How do I translate that to:</p>
  
  <pre>
         A     B
  P1     1     4
  P2     1     1
  P3     2     null
  P4     null  1
  </pre>
  
  <p>Thanks,</p>