1
vote
2answers
1k views

why does my pivot give me an error?

Msg 207, Level 16, State 1, Line 1 Invalid column name 'FullName'. select FullName, ['1-Urgent'], ['2-High'], ['3-Medium (3000)'] from (select FullName,AltBusinessSeverity, total from Mdata) AS ST ...
1
vote
1answer
352 views

How can I pivot this select?

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 ...
4
votes
2answers
937 views

SQL Server 2005 : How to use pivot instead of a bunch of case statements?

Please show me how I can modify this SQL select to use pivot instead of all the case statements. SELECT t.ProjectId, COALESCE(MAX(ExecutiveChampion), 'n/a'), ...