Skip to content
Advertisement

Using PIVOT to get SELECT into one column, not row

I am trying to make a select, which would show the result into ONE column, not row. I tried using PIVOT, but I am not successful at all.

Result of my select:

I want to have it like this:

Advertisement

Answer

You can use cross apply to obtain a single column:

results:

enter image description here

or, if you prefer having a separate column for descriptions:

output:

enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement