I have the challenge to query a sql server label with the follow context:
to get a result like this:
Does anybody have an idea how to implement the sql query?
I tried to use the sql pivot function without good results.
Thank you in advance!
I have the challenge to query a sql server label with the follow context:
to get a result like this:
Does anybody have an idea how to implement the sql query?
I tried to use the sql pivot function without good results.
Thank you in advance!
This is like the most basic pivot example there can be. Admittedly, pivot syntax is kinda weird. From the top of my head:
select id, [Text01], [Text02], [Text03]
from yourtable
pivot (max(value) for Name in ([Text01], [Text02], [Text03])) pv