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: nlssort

Re: nlssort

From: Peter Gulutzan <pgulutzan_at_ocelot.ca>
Date: 15 Nov 2002 16:25:06 -0800
Message-ID: <36c478c6.0211151625.7b79a3b7@posting.google.com>


hegyvari_at_ardents.hu (Hegyvari Krisztian) wrote in message news:<9003d46f.0211100219.120c38a0_at_posting.google.com>...
> Greetings,
>
> I run a 8.1.7. database with the following settings:
>
> nls_lang=HUNGARIAN
> nls_sort=HUNGARIAN
> nls_comp=ANSI
>
> The correct alphabetical order in the Hungarian language is A,Á,B,....
> and for basic queries Oracle knows it, I can verify it using queries
> like "select * from dual where 'A'>'Á'" which gives no results and
> with 'B'>'Á' which results in an X. So far so good. The same query
> with 'BÁ'>'BA' results in an X which is good. 'BÁ'>'BAC' gives no
> results, which is bad, since Á is the second character in the string,
> while C is the third, according to how I order strings BÁ would come
> later than BAC. If I check nlssort('BÁ','NLS_SORT=HUNGARIAN') and
> nlssort('BAC','NLS_SORT=HUNGARIAN'), the second is greater, I think
> that is what causes this misbehaviour.
>
> Do I know something wrong or is this a bug which may have been
> corrected already?
>
> Any answers are highly appreciated, please cc it to
> hegyvari_at_ardents.hu.
>
> Regards,
>
> Hegyvari Krisztian

I had always understood that the Hungarian exceptional rules are: Á may follow A, CS follows C, Ê may follow E, Ö follows O, Ü follows U, ZS follows Z, and the digraphs (GY, LY, NY, SZ TY) are separate characters but follow (G, L, N, S, T) anyway. The words "may follow" would imply that the rule is optional, followed in some dictionaries/lists but not all. So I too would be interested in knowing which rules Oracle follows.

For several other European languages and an overview of what DB2 and Oracle and SQL Server do with them, see my article "SQL Collations" at http://dbazine.com/gulutzen1.html.

Peter Gulutzan
Co-Author of SQL Peformance Tuning (http://www.ocelot.ca/tuning.htm) Received on Fri Nov 15 2002 - 18:25:06 CST

Original text of this message

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