![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
Here is my input
Col1, Col2
--------------
a,1
a,2
a,3
a,4
b,1
b,5
b,6
And the output I want is
Col
-----
a
1
2
3
4
b
1
5
6
By using pivot I am getting
a
1
a
2
a
3
a
4
b
1
b
5
b
6
Please help!!!
Moderators: chulett, rschirm, roy
If you set the option Create Key Change column in sort to true then sort creates a column keyChange and output of sort isa,1
a,2
a,3
a,4
b,1
b,5
b,6
If keyChange is one then add a newline char between Col1 and Col2 else just Col2a,1,1
a,2,0
a,3,0
a,4,0
b,1,1
b,5,0
b,6,0
Code: Select all
If keyChange=1 then Col1 : char(10): Col2 Else Col2