Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: What query can sort this?

Re: What query can sort this?

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 4 Sep 2003 17:33:16 GMT
Message-ID: <bj7t0r$gcgj1$1@ID-82536.news.uni-berlin.de>

> maybe u can split the column into number columns, col1,col2,col3,... and
> then order by col1,col2,col3...
> I don't have time to write the sql statement, but I expect it'll be very
> complex, and you need functions like instr,substr,decode.
> 
> 
> 
> regards,
> 
> HuCY
> "Sean" <aether8203_at_yahoo.com>
> ??????:9f0ea455.0309031737.5028d39a_at_posting.google.com...

>> I have been trying to sort on a column of data and am stumped. Does
>> anyone have any advice?
>>
>> The column is a VARCHAR2(15)
>>
>> Footnote_no
>> ------------
>> 1
>> 1.1
>> 1.2
>> 1.2.1
>> 1.2.2
>> 1.2.2.1
>> 1.4
>> 1.6
>> 1.10
>> 1.11
>> 1.12
>> 1.12.1
>> 1.12.1.1
>>
>> etc.
>>
>> As you can tell from the data above, it is already in a nice ascending
>> order and is the ultimate result I am looking for. By just applying a
>> sort you get
>>
>> 1.10
>> 1.11
>> 1.12
>> 1
>> etc...
>>
>> I think you get the idea.
>>
>> Any suggestions?
>> Thanks,
>> Sean
 

See http://www.adp-gmbh.ch/ora/misc/sort_chapter/index.html

Hth,
Rene

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch
Received on Thu Sep 04 2003 - 12:33:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US