Transposing from rows into columns

Posted by Deques on Stack Overflow See other posts from Stack Overflow or by Deques
Published on 2010-06-07T09:05:37Z Indexed on 2010/06/07 9:42 UTC
Read the original article Hit count: 171

Filed under:
|
|

Hey, I have a table like this

Name    State       Amount
------------------------------
Pump 1  Present     339
Pump 1  Optimized   88

Which I want to transpose something like this

Pump 1  Present     339 Optimized   88

How can I do this with MS SQL 2000? I tried to search for a solution, but couldn't find the most fitting solution :(

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server