Re: Exponential puzzler

From: Phillip Jones <phil_at_phillip.im>
Date: Mon, 27 Feb 2012 13:22:43 +0000
Message-ID: <CAOyzJue3SZ0fJwHyjSeBgRYcAh8oWACTYrfRWPqPt117EpHDDQ_at_mail.gmail.com>



Hi,
SQL> select
to_char('8.912655903259292E-5','99999999999.999999999999999999999999999')
from dual;

TO_CHAR('8.912655903259292E-5','99999999


        .000089126559032592920000000

SQL> You can then TO_NUMBER it to cast it.

Cheers,

Phil

On Mon, Feb 27, 2012 at 1:06 PM, Robertson Lee - lerobe < Lee.Robertson_at_acxiom.com> wrote:

> Guys,
>
>
> Anyone had to convert an exponential number to a proper decimal number ?
>
>
>
> Ive got a varchar2 field which holds an exponential number as a string
> and need to get it out as a real number....
>
>
>
> e.g
>
>
> select popularity from lee1;
>
>
> returns
>
>
> 8.912655903259292E-5
>
>
> I would have thought a simple
>
>
> select to_number(popularity) from lee1;
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 27 2012 - 07:22:43 CST

Original text of this message