title: SQL Server 2012 Pivot Table
body: <p>I need to create a query that shows the results in a pivot table.</p>
  
  <p>I have a table that is updated regularly with clients Build Status Changes</p>
  
  <p>WE have 8 stages to a build</p>
  
  <ul>
  <li>115  Land Purchased</li>
  <li>116  Foundations</li>
  <li>117  Timber Kit Erected / Wall Plate Level</li>
  <li>118  Wind &amp; Water Tight</li>
  <li>119  1st Fix &amp; Plastering </li>
  <li>120  Final Fit Out</li>
  <li>121  Completed</li>
  <li>122  Redeemed</li>
  </ul>
  
  <p>Here is my query </p>
  
  <pre><code>SELECT 
      s.ProjectStage, su.DateStageChanged, p.FK_ID As ID,
      s.LongDesc AS BuildType, su.FK_StageID  
  FROM 
      [dbo].[tbl_StageUpdates] AS su
  LEFT JOIN
      [dbo].[tbl_Stage] AS s ON su.FK_StageID = s.id
  LEFT JOIN 
      tbl_Projects AS p ON su.FK_ProjectID = p.PK_ProjectID
  WHERE 
      s.LongDesc = 'New Build'
  GROUP BY 
      p.FK_ID, s.ProjectStage, su.DateStageChanged, s.LongDesc, su.FK_StageID
  ORDER BY 
      su.FK_StageID ASC
  </code></pre>
  
  <p>ID is the clients ID what i would like is have the query display the information like this:</p>
  
  <p><a href="https://i.stack.imgur.com/BhhB2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BhhB2.jpg" alt="enter image description here"></a></p>
  
  <p>Is it possible to do?</p>
  
  <p>Any help on this would be greatly appreciated</p>
  
  <p>Cheers</p>