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 -> Re: Query returns wrong results

Re: Query returns wrong results

From: Steven <askme_at_nowhere.com>
Date: Thu, 23 Jan 2003 14:39:55 +0100
Message-ID: <b0orbc$s65pp$1@ID-82797.news.dfncis.de>

"Steven" <askme_at_nowhere.com> wrote in message news:b0ocb5$rllng$1_at_ID-82797.news.dfncis.de...
> Hi,
>
> I have a table with a number(15,4) column.
>
> If I query that table as follows:
>
> select * from mytable where number_column > 0
>
> If get the rows containing the 0 value !!!!!! I should not. When I look
in
> sqlplus the number is really 0, the only way it does not display is when I
> do a select with greater then 1.
>
> I don't get it. does anyone know what's going on??
>
> I'm using oracle 8.1.7.0 on solaris 7
>
> Thanks in advance,
> Steve.
>
>
> --
> -----------------------------------------------------------------
> Holidays in Berchtesgaden, Germany:
> http://www.sonnenkoepfl.de
> http://unterkunft-berchtesgaden.de
> http://pension-berchtesgaden.de
>
>

I have discovered that if I use the to_number() function then I get the correct results. I believe the data stored in the field is somewhat strange. For example, if I update the row and enter 0 then the results are correct. It seems that the orginal entered value (from a java application) is somewhat messed up. even though it display 0 the select statement does not believe this is a numeric value.

Anyone know how I can get the datatype of a value for a field??

S. Received on Thu Jan 23 2003 - 07:39:55 CST

Original text of this message

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