dbTalk Databases Forums  

Number(30)

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Number(30) in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
val
 
Posts: n/a

Default Number(30) - 05-03-2007 , 01:32 AM






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!


Reply With Quote
  #2  
Old   
ChrisF
 
Posts: n/a

Default Re: Number(30) - 05-03-2007 , 07:30 AM







val wrote:
Quote:
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.



Reply With Quote
  #3  
Old   
DA Morgan
 
Posts: n/a

Default Re: Number(30) - 05-03-2007 , 10:15 AM



val wrote:
Quote:
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!
You need to format the output.
www.psoug.org
Morgan's Library
click on SQL*Plus
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.