IsaiSelvan S

IsaiSelvan S

  • 1.9k
  • 81
  • 1k

How to convert rows to columns in sql server 2008

Mar 27 2018 3:48 AM
Hi Team,
please find the below table format. I need the output for the below format. I'm trying to retrieve output format but only one column able to bind. I'm working in Sql server 2008 R2. I'm working last 2 days but i can't to bind it.I need the without using pivot and unpivot function.
Table:
======
      AAA    AA+     AA     AA-
A    6.05     7.15     9.5       8.5
B    3.02     4.58     6.25     7.25
C    2.25     1.02     0          6
Output:
=======
No       A          B       C
AAA    6.05    3.02    2.25
AA+    4.05    3.04    1.02
AA       3.02    4.05    0
AA-    2.03    3.01       6

Brought to you by:

Answers (9)