Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8.1.7 sort order
It looks like you might have the wrong character set, at least for what
you're used to seeing in your native language. Your collating sequence is
what orders the special characters and numbers prior to letters. What
character set (NLS setting) does your database have?
-Roger Crowley
"Jukka Peltonen" <jukka.peltonen_at_helsoft.fi> wrote in message
news:1028632504.672626_at_ns2...
> Hello, I hope someone can explain this to me ....
>
> Enviroment: Oracle 8.1.7, W2K, client 8.1.6 (oci.dll version)
>
> Table: NIMIKE
> Column:NIMIKEKOODI VARCHAR2 (40) NOT NULL
>
> I get different results from following two SQL-clauses
>
> 1st clause:
> select nimikekoodi from nimike where nimikekoodi < 'N50295X350'
>
> Result: Rows that starts with numbers and "normal strings" that are
smaller
> than 'N50295X350'
>
> Data:
> (EI)PAL495X703
> // KALV 80
> // VSK-MPE
> 001271X495
> ....
> N50295X278
>
> I think this is correct result.
>
> 2nd clause:
> select nimikekoodi from nimike order by nimikekoodi
>
> Result: All rows, but order is funny (at least I think so) because now
those
> rows that starts with numbers are now after
> row 'N50295X350'
>
> Data:
> '// KALV 80'
> ....
> 'N50295X350'
> ....
> 9,964VKI
>
> I think this is NOT a correct result.
>
> What am I doing wrong?
>
> I think that there is something wrong because field nimikekoodi values are
> handled differently
> depending on if it is in where- or order part of SQL-clause
>
>
Received on Tue Aug 06 2002 - 08:30:38 CDT