Was Sie wollen, heißt UNPIVOT
und so gemacht:
select id,field,value from
#document_fields
unpivot
(
value
for field in (x,y,z)
) as u
order by id,field
Was Sie wollen, heißt UNPIVOT
und so gemacht:
select id,field,value from
#document_fields
unpivot
(
value
for field in (x,y,z)
) as u
order by id,field