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: Decode() function fails in 8.1.5/Linux

Re: Decode() function fails in 8.1.5/Linux

From: Stephan Born <stephan.born_at_beusen.de>
Date: Fri, 05 Nov 1999 10:43:28 +0100
Message-ID: <3822A6C0.ABCF100D@beusen.de>

fumi schrieb:

>
> SQL> select 1/(1/19) from dual;
>
> 1/(1/19)
> ---------
> 19
>
> SQL> select decode(1/(1/19), 19, 1, 0) from dual;
>
> DECODE(1/(1/19),19,1,0)
> -----------------------
> 0
>
> > Theoretically, the result is 1,
> > but realistically, it is 0.

Try

select to_char(1/(1/19), '99.9999999999999999999999999999999999999999') from dual;

You will see that the result is not exactly 19

Regards, Stephan
--


Dipl.-Inf. (FH) Stephan Born   | beusen Consulting GmbH
fon: +49 30 549932-17          | Landsberger Allee 392
fax: +49 30 549932-29          | 12681 Berlin
mailto:stephan.born_at_beusen.de  | Germany
---------------------------------------------------------------
       PGP-Key verfügbar       |      PGP-Key available
---------------------------------------------------------------


Received on Fri Nov 05 1999 - 03:43:28 CST

Original text of this message

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