Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Concatenation of alphabets of a string alphabetically

907162Feb 21 2013 — edited Feb 26 2013
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2013
Added on Feb 21 2013
13 comments
825 views