Transpose Columns to Row group by [message #651529] |
Thu, 19 May 2016 10:39 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/0429c0a4a5ff0c4bf3c899e5deea2c13?s=64&d=mm&r=g) |
dimveg
Messages: 1 Registered: May 2016
|
Junior Member |
|
|
Hi to all,
I have a question how to write a query as i am not that experienced with sql
My table is somthing like that
ID_A|Start_Date|End_Date
-------------------------
A | t1 | t2
A | t3 | t4
B | t5 | t6
B | t7 | t8
B | t9 | t10
C | t11 | t12
Is there a way to take the below resuslt? i tried to use a combination of row number & partition over but my poor know how didn't give the result i need
ID_A|Start_Date_1|End_Date_1|Start_Date_2|End_Date_2|Start_Date_3|End_Date_3|
------------------------------------------------------------------------------
A | t1 | t2 |t3 |t4
B | t5 | t6 |t7 |t8 |t9 |t10
C | t11 | t12
thanks in advance
|
|
|
|
|
|