Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

Wie werden Textspalten in SQL Server geschwenkt?

Select severity_id, pt.People, Assets, Environment, Reputation
FROM 
(
    select * from COMM.Consequence
) As Temp
PIVOT
(
    max([DESCRIPTION]) 
    FOR [TYPE] In([People], [Assets], [Environment], [Reputation])
) As pt