transpose rows to columns in sql
问题 I have problem in getting the desired output with the SQL query. My sql data is as follows: TOTAL Charge PAYMNET A B C D E MonthYear ------- ----------- ----------- --------- -------- ---------- ------- ------- ---------- 661 157832.24 82967.80 700.00 10.70 58329.33 0.00 0.00 Oct-2013 612 95030.52 17824.28 850.00 66.10 53971.41 0.00 0.00 Nov-2013 584 90256.35 16732.91 700.00 66.10 52219.87 0.00 0.00 Dec-2013 511 72217.32 12336.12 285.00 53.17 42951.12 0.00 0.00 Jan-2014 I need the output as