the PIVOT command is, indeed, what you're looking for. Some documentation for it is here: http://msdn.microsoft.com/en-us/library/ms177410.aspx
If you want a more helpful answer than "PIVOT", you need to provide us with more information about what you are trying to do.
Include the table schema, some sample data, and what you're trying to achieve, then we will be able to be more helpful.
answered Jun 10, 2010 at 07:46 AM
I haven't taken a liking to PIVOT (yet), so often I rely on the CASE statement, which can be your friend.
answered Jun 10, 2010 at 05:01 PM