Transpose Columns to Row group by [message #651529] |
Thu, 19 May 2016 10:39 |
|
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
|
|
|
|
|
|