I’m looking for ways to display a single row of data as a single column (with multiple rows). For example,
FieldA FieldB ------- --------- 1 Some Text [row] Header Value [col] ------ ------ FieldA 1 [row1] FieldB SomeText [row2]
Is there a way to do this with SQL Server 2005?
Yup, there’s a TSQL command, PIVOT. And there are several existing threads on this topic; but I can’t find one offhand.
My usual answer (probably 5 or 6 of those threads) is to think about using Excel or Access if appropriate – it’s a pretty easy way to deliver value to end-users. But YMMV.