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: own order by

Re: own order by

From: Stephan Born <stephan.born_at_beusen.de>
Date: Tue, 09 Jul 2002 10:33:47 +0200
Message-ID: <3D2A9FEB.3010905@beusen.de>


Wolf wrote:
> Is there a way to tell oracle how the "order by" clause orders
> the database entries. (except asc, desc).
> Example:
> I want to sort VARCHAR2 Fields but no by alphabetical order.
> So I want to define that X is the first letter and F ist the second letter
> in order and so on...

try this:

select lower( kb.OBJEKTNAME ), translate( lower( kb.OBJEKTNAME ), 'abcdefghijklmnopqrstuvwxyz', 'opqrstuvwxyzabcdefghijklmn' ) for_testing_purpose_only
from your_table kb
order by translate( lower( kb.OBJEKTNAME ), 'abcdefghijklmnopqrstuvwxyz', 'opqrstuvwxyzabcdefghijklmn' );

regards, Stephan

-- 
---------------------------------------------------------------
Dipl.-Inf. (FH) Stephan Born   | beusen Solutions GmbH
fon: +49 30 549932-0           | Landsberger Allee 366
fax: +49 30 549932-21          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
        PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------
Received on Tue Jul 09 2002 - 03:33:47 CDT

Original text of this message

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