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: problem comparing strings

Re: problem comparing strings

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 6 Oct 1999 11:27:22 +0100
Message-ID: <939205665.19236.0.nnrp-03.9e984b29@news.demon.co.uk>

I think your problem is national language support. Given your email address and the name of the table I would guess that you have (some of) Oracle's NLS parameters set to German.

This is why fb sorts earlier than f1.
From sql*plus execute:

    alter session set nls_sort = binary and you will find that f1 sorts above fb.

(I assume that your Access environment doesn't have a German NLS envirnoment.)

However, the nls_sort only affects the sorting of ORDER BY, so your comparison with

    37fb085cbd1a7 eliminates all the rows after     37F1.....

one option is to use the nlssort function in the query, in the form:

where

    nlssort(hnr,'nls_sort=german') >

        nlssort('37fb085cbd1a7','nls_sort=german')

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Oliver H. wrote in message <7tf5s3$fm1$1_at_nnrp1.deja.com>...
>A list with a unique alphanumeric key (HNR=VCHAR2(15)) sort by HNR:
>
>SQL> select hnr from tbl_merkzettel order by hnr;
>
>HNR
>---------------
>37ef7501b82de
>37fb085cbd1a7 <----------
>37f1dc0d46f04
>37f1dc1cf0efc
>37f323ff81e3c
>
>
>I want to get the next line after the marked:
>
>SQL> select * from tbl_merkzettel where hnr>'37fb085cbd1a7' order by
>hnr;
>
>No Output
>
>I tried the same with a MS Access Table and get a different order
>
>SELECT HNR
>FROM merk
>ORDER BY HNR;
>
>HNR
>37ef7501b82de
>37f1dc0d46f04
>37f1dc1cf0efc
>37f323ff81e3c
>37fb085cbd1a7
>
>So the oracle server delivers a wrong order. What's the problem?
>
>
>
>
>
>
>
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Wed Oct 06 1999 - 05:27:22 CDT

Original text of this message

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