SELECT
sc.CID,sc.CodeName as OverviewText,scRAG.CodeName as RAGStatusText
FROM
StatusCode sc
LEFT OUTER JOIN
ProjectOverview po
ON sc.CID = po.ProjectOverviewCID AND po.ProjectId = 180
LEFT OUTER JOIN
StatusCode scRAG
ON po.RAGStatusCID = scRAG.CID
WHERE sc.SCID = 18
the above code result sin this:
CID OverviewText RAGStatusText
153 Cost Green
154 Requirements Yellow
155 Schedule NULL
156 Technical NULL
157 Testing NULL
I want it to return one record with 10 fields:
Cost, Green, Requirements, Yellow, Schedule, NULL, Technical, NULL, Testing, NULL
Can i pivot on cid?