I need to create a query that shows the results in a pivot table.
I have a table that is updated regularly with clients Build Status Changes
WE have 8 stages to a build
- 115 Land Purchased
- 116 Foundations
- 117 Timber Kit Erected / Wall Plate Level
- 118 Wind & Water Tight
- 119 1st Fix & Plastering
- 120 Final Fit Out
- 121 Completed
- 122 Redeemed
Here is my query
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
ID is the clients ID what i would like is have the query display the information like this:
Is it possible to do?
Any help on this would be greatly appreciated
Cheers