Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sort
mabraham_tp_at_hotmail.com (Mary) wrote :
> I have two lists (19,21,20,22,23) and (1,2,3,4,5). The second list
> corresponds to the values in the first list. I would like to sort the
> first list as (19,20,21,22,23) As a result the second list should
> become (1,3,2,4,5)
>
> How should I do this? Please help
create table lists
( seqnum number(3),
value number(6)
)
insert into lists values(1, 19)
insert into lists values(2, 21)
..etc.
insert into lists values(5, 23)
select
value "LIST1",
seqnum "LIST2"
from lists
order by 2
Now if this is not what you're looking for, comp.databases.oracle.* is not the the place for you and you're postings are off-topic, n.a. and not welcomed.
-- BillyReceived on Mon Nov 10 2003 - 23:49:44 CST
![]() |
![]() |