Concatenation of alphabets of a string alphabetically
907162Feb 21 2013 — edited Feb 26 2013Hi Guru's
I have a requirement where I need to arrange the letters of a string alphabetically. I have tried the following query and I am able to arrange it alphabetically but output is in different rows and am not able to concatenate the values.
My query: select chr(ascii(substr('QLYBT',level,1))) from dual
connect by level <= length('QLYBT') order by ascii(substr('QLYBT',level,1));
here QLYBT is my entered string. I am getting the output as
B
L
Q
T
Y
Please help me concatenate this string. I do not want to use any complex code and need it to be as small as possible.
I am using Oracle 10g.
Please help me on this.
Thanks
Regards
Ankit