Re: Number(30)

From: ChrisF <chris.freel_at_gmx.ch>
Date: 3 May 2007 05:30:27 -0700
Message-ID: <1178195427.547792.228220_at_q75g2000hsh.googlegroups.com>


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. Received on Thu May 03 2007 - 14:30:27 CEST

Original text of this message