Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Decode() function fails in 8.1.5/Linux
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