Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Oracle 8.1.7 sort order
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 - 06:15:08 CDT
![]() |
![]() |