Path: news.f.de.plusline.net!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!out04a.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!q75g2000hsh.googlegroups.com!not-for-mail
From: ChrisF <chris.freel@gmx.ch>
Newsgroups: comp.databases.oracle.tools
Subject: Re: Number(30)
Date: 3 May 2007 05:30:27 -0700
Organization: http://groups.google.com
Lines: 19
Message-ID: <1178195427.547792.228220@q75g2000hsh.googlegroups.com>
References: <1178173928.865944.324780@n59g2000hsh.googlegroups.com>
NNTP-Posting-Host: 80.238.139.18
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1178195427 17194 127.0.0.1 (3 May 2007 12:30:27 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 3 May 2007 12:30:27 +0000 (UTC)
In-Reply-To: <1178173928.865944.324780@n59g2000hsh.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: q75g2000hsh.googlegroups.com; posting-host=80.238.139.18;
   posting-account=aRjEzA0AAACIMHXsuouRmgPjef_qix4N
Xref: news.f.de.plusline.net comp.databases.oracle.tools:35671


val wrote:
> hi,
> we currently have a column in our table (oracle 9i) defined as
> number(30).  however, when we try to insert data that has 25 digits,
> it stores the number as 1.7909364352007E23.  can you let me know why
> it has exponents versus loading the number as is with 25 digits?  how
> can i  change the datatype to store 25 digits.  varchar(30)?
>
> thanks!

Oracle IS storing it as a 30-digit integer, exactly as you specified.
But, it is DISPLAYING it in exponential notation, because that is the
default for integers over a certain length. All arithmetic you do on
this value will work OK as a 30-digit integer.
If you want to display it other than in the default way (e.g. as 30
digits), look up TO_CHAR() in the documentation. This allows you to
specify the display format.

