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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Sort

Re: Oracle Sort

From: Lothar Armbruester <lothar.armbruester_at_t-online.de>
Date: Tue, 16 Oct 2001 18:36:50 +0200
Message-ID: <PM00039073647112C7@hades.none.local>


Fredy Tschui wrote:
> How can i change the sort "type" in oracle 8i ?
>
> Currently (special charachters are ignored)
> "a", "b", "(c", "d", "(e"
>
> but i need this:
> "(c", "(e", "a", "b", "d"
>

Fredy,
there are basicly two options:

If you just need this order in one SQL, you could do the following:

select my_column from my_table
order by nlssort(my_column,'nls_sort=BINARY');

If you generally need this for a single session, you would do:

alter session set nls_sort=BINARY;

Hope that helps,
Lothar

-- 
Lothar Armbrüster       | la_at_oktagramm.de
Hauptstr. 26            | la_at_heptagramm.de
D-65346 Eltville        | lothar.armbruester_at_t-online.de
Received on Tue Oct 16 2001 - 11:36:50 CDT

Original text of this message

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