I want to convert the columns into rows using SQL Server. I have already tried unpivot but not enough knowledge to make it only can make the one column
SELECT Unit,Excess_Reactivity ,Refuelling_required,MBP,MCP ,CPPF,Date FROM yourTable // select statement
//insert to check data
INSERT INTO yourTable
(Unit,Excess_Reactivity ,Refuelling_required,MBP ,MCP ,CPPF ,Date)
VALUES
('TAP-4','52','test1','12','96','35','2019-06-11 00:00:00.000')
INSERT INTO yourTable
(Unit,Excess_Reactivity ,Refuelling_required,MBP ,MCP ,CPPF ,Date)
VALUES
('TAP-2','52','test1','12','96','35','2019-06-11 00:00:00.000')
INSERT INTO yourTable
(Unit,Excess_Reactivity ,Refuelling_required,MBP ,MCP ,CPPF ,Date)
VALUES
('TAP-3','52','test1','12','96','35','2019-06-11 00:00:00.000')
This is table
+--------+--------+---------+-----+-----+------+------------+
| UNit | excess | refuell | MBp | MCP | CPPF | DATE |
+--------+--------+---------+-----+-----+------+------------+
| TAPS-4 | 52 | test1 | 12 | 96 | 35 | 11/06/2019 |
| TAPS-3 | 52 | test1 | 13 | 96 | 35 | 11/06/2019 |
| TAPS-2 | 52 | test1 | 42 | 96 | 35 | 11/06/2019 |
| TAPS-1 | 52 | test1 | 18 | 96 | 35 | 11/06/2019 |
+--------+--------+---------+-----+-----+------+------------+
I want like this as shown below:
Values TAPS-4 TAPS-3 TAPS-2 TAPS-1
--------------------------------------
excess 52 52 52 52
MBp 12 13 42 18
MCP 96 96 96 96
CPPF 35 35 35 35
VALUES?