I have a table; Table A.
+-----+----------+
|month|value_deal|
+-----+----------+
|JAN |10 |
+-----+----------+
|JAN |20 |
+-----+----------+
|FEB |30 |
+-----+----------+
|FEB |40 |
+-----+----------+
I want to convert the rows value_deal as columns with the same month and make it as view, like this.
+-----+-----------+-----------+
|month|value_deal1|value_deal2|
+-----+-----------+-----------+
|JAN |10 |20 |
+-----+-----------+-----------+
|FEB |30 |40 |
+-----+-----------+-----------+
I've tried using dynamically convert rows to column in here. But I can't insert the code inside Create View functions.
Can anyone help? pls