Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Strange SQL-Results

Re: Strange SQL-Results

From: Thomas Bahn <tbahn_at_psh-kiel.de>
Date: 2000/06/22
Message-ID: <3951c377.75005882@194.25.34.8>#1/1

On Thu, 15 Jun 2000 14:59:50 +0200, "Christian Hartmann" <c.hartmann_at_tmp-office.de> wrote:

> I have very strange results with a table in which are "normal" Strings and
> Strings like 0001 included.
>
> Create table test (test_nr char(18))
> Insert into test values ('ZUABSCHLAG')
> Insert into test values ('0001')
> Insert into test values ('0002')
>
> Select test_nr from test where test_nr>'ZUABSCHLAG'
> No rows

Hallo Christian,

what did you exspect? I think, the result is absolutly correct.

Let's see. Which of your data is bigger (alphabetically after) 'ZUABSCHLAG'? '0001' is smaller, '0002' is smaller (since the ASCII value of '0' is smaller then the value of 'Z') and 'ZUABSCHLAG' is equal, thus nothing is bigger then 'ZUABSCHLAG'.

HTH
Thomas Bahn Received on Thu Jun 22 2000 - 00:00:00 CDT

Original text of this message

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