Hi All,
I have a sql query .
o/p :
id owner sales month
1 mohan 5 sept-17
2 sohan 6 Oct-17
3 mohit 2 Nov-17
4 abdul 19 Dec-17
required O/p:
id owner sept-17 Oct-17 Nov-17 Dec-17
1 mohan 5
2 sohan 6
3 mohit 2
4 abdul 19
Now my month column value is not fixed its depend on my where clause ,some time its 4 and some times it may be 20 so i can not use direct PIVOT function.
Kindly suggest me some approach.
Thanks