Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: own order by
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