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!

Order alphanumeric values.

syed haiderJan 4 2019 — edited Jan 4 2019

Below is the sample code.

create table test

(session varchar(25)

)

insert into test

values ('1 session')

insert into test

values ('3 sessions')

insert into test

values ('11 sessions')

insert into test

values ('2 sessions')

insert into test

values ('10 sessions')


select *
from test

I want to have the output as follows;

1 session

2 sessions

3 sessions

10 sessions

11 sessions

Please let me know how I can accomplish this task. I tried using lpad(session, 9), but that didn't help.

Thanks in advance

Message was edited by: 841137

Comments
Post Details
Added on Jan 4 2019
5 comments
390 views