I have a large data set and am trying to replicate an excel pivot table in SQL Server. I am unable to find an example where I do not have to manually name the column headings using the PIVOT
function in T-SQL.
I am looking for a way to use SELECT DISTINCT [column 1]
as my row names and SELECT DISTINCT [COLUMN 2]
as my column names and populate that table using data in a third column.
Please help!