sort/select discrepancy with umlaut Oracle 7 
Author Message
 sort/select discrepancy with umlaut Oracle 7
Hi!

Using "select company from adresses order by company" I get a correctly
sorted list of companies according to my setting GERMAN_DIN.

Using "select company from adresses where company >= 'K' order by company",
lists companies starting with umlaut A (ae) followed by companies starting
with K or larger.

How can I get Oracle to select as it sorts? That is, if Ae is sorted before
K, do the same with select and NOT select Ae?

Thanks,

Thomas



Mon, 08 Dec 2003 20:19:46 GMT
 sort/select discrepancy with umlaut Oracle 7

Quote:

[...]

> Using "select company from adresses where company >= 'K' order by
> company",
> lists companies starting with umlaut A (ae) followed by companies
> starting
> with K or larger.

> How can I get Oracle to select as it sorts? That is, if Ae is sorted
> before
> K, do the same with select and NOT select Ae?

Hello Thomas,
try this:

select company from adresses where nlssort(company)>=nlssort('K');

You might consider creating a function based index on nlssort(company)
if this kind of query occurs more often...

Hope that helps,
Lothar

--





Tue, 09 Dec 2003 03:33:02 GMT
 sort/select discrepancy with umlaut Oracle 7
Thanks Lothar,

I'll give it a try.

Thomas



Quote:

> [...]

> > Using "select company from adresses where company >= 'K' order by
> > company",
> > lists companies starting with umlaut A (ae) followed by companies
> > starting
> > with K or larger.

> > How can I get Oracle to select as it sorts? That is, if Ae is sorted
> > before
> > K, do the same with select and NOT select Ae?

> Hello Thomas,
> try this:

> select company from adresses where nlssort(company)>=nlssort('K');

> You might consider creating a function based index on nlssort(company)
> if this kind of query occurs more often...

> Hope that helps,
> Lothar

> --






Wed, 10 Dec 2003 21:04:34 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. oracle jdbc and german umlauts

2. Oracle sort order on HP-UX versur Windows sort order

3. Oracle sort order on HP-UX versur Windows sort order

4. SQL Question (sorting selects)

5. Newbie select, sort and retrieve question

6. Sort Order and Select

7. How to sort order in SELECT by ascending/descending order for MS SQL

8. Sort Order and select statements

9. Advice Selecting Sort Order & Character Set

10. SELECT *, Is order of rows maintained if no sort order is specified

11. Sorting a resultset within the same SELECT


 
Powered by phpBB® Forum Software