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

Home -> Community -> Usenet -> c.d.o.misc -> Help on expression compare in Oracle

Help on expression compare in Oracle

From: Roby <roby81it_at_hotmail.com>
Date: 20 Jan 2003 05:28:04 -0800
Message-ID: <78d0e70f.0301200528.46056881@posting.google.com>


Hi to all newsgroup !!!
Sorry for my bad english...

I have a table with this values returned by Sql*Plus:

SQL> select * from test order by 1;

CHIAVE DESCR
-------------------- ------------------------------

A1                   desc1
A2                   desc2
A3                   desc3
0100                 desc4
0101                 desc5
0200                 desc6

And I have this strange situation:

SQL> select * from test where chiave < '0100';

no rows selected

SQL> select * from test where chiave > '0100';

CHIAVE DESCR
-------------------- ------------------------------

A1                   desc1
A2                   desc2
A3                   desc3
0101                 desc5
0200                 desc6

If I decide to order by CHIAVE, why Oracle considers 'A1' lesser than '0100', but when I select values where chiave < '0100', it return no rows ???

Please, help me...

Bye,

       *Roby* Received on Mon Jan 20 2003 - 07:28:04 CST

Original text of this message

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