Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Strange SQL-Results
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