I have a SQL Server table that looks like this:
RESOURCE | DESCRIPTION | VALUE Test A Name | Resource A-xyz Test A | Height | 20 Test A
try this code:
SELECT resource,Name,Height,Unit,Location,Volume,Width FROM #T1 AS SourceTable PIVOT ( max(value) FOR description IN ([Name],[Height],[Unit],[Location],[Volume],[Width]) ) AS PivotTable ORDER BY 1