Sorry for an unclear question previously; hopefully I can start again...
I have this data:
entityid name stringvalue
----------- -
The answer turned out to be this:
select *
from
(
select entityid, [name], stringvalue as stringvalue
from mytable
) as d
pivot
(
min(stringvalue)
for [name] in ([ShortDescription],[LongDescription])
)
as p
:)
The flaw was that the input table should have had 1, 1, 2, 2, 3, 3 for the entityid rows, respectively.
M