How do I do pivoting in this query in SQL?

Posted by dewacorp.alliances on Stack Overflow See other posts from Stack Overflow or by dewacorp.alliances
Published on 2010-05-26T06:47:11Z Indexed on 2010/05/26 6:51 UTC
Read the original article Hit count: 151

Filed under:
|

Hi there

I have this table like this:

Name; Amount1, Amount, Rate1, Rate2
Test; 1000; 2000; 1.0; 2.0

I want to display into:

Parameter; Amount1; Rate1; Total
'Parameter 1'; 1000; 1.0; 1000 
'Parameter 2'; 2000; 2.0; 4000

BTW ... I am using SQL2K5. All I can think of is CURSOR. Any other solution in elegant way?

Thanks

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server