Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73

    Unanswered: how to store double data type number in Oracle table

    The double data type both in Java and C are capable of storing numbers up to
    1.7976931348623158e+308 values.



    I am trying to find a matching data type in Oracle, but the maximum number that I am capable to use is around 1E+125 using the NUMBER or FLOAT data types.



    Is there a way to use numbers with the magnitude mentioned above? I mean to work with such numbers not just store them is a varchar column. If so what is the data type I should use?





    Thanks,



    Tal (otal@mercury.co.il).

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    I dont think Oracle has a datatype to hold numbers greater than 1E+125 as even the ansi standard datatypes are just mapped onto number. The funny thing is the Oracle Number datatype holds numbers to a far higher precision than double as it can be upto 21 bytes in size if I recall correctly.

    Alan

    p.s. goto www.ixora.com.au for more info on how numbers are held.

  3. #3
    Join Date
    Jun 2003
    Posts
    2

    Lightbulb

    I have had a similar problem to this before. I used two columns, one to store the prefix and the other to store the exponent. When you need to work with the number select both rows and then calculate the full number in your Java / C program.

    Very long winded tho!

  4. #4
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73
    I have open a support call on this subject in Oracle and they notified me that they are going to create BINARY_DOUBLE and BINARY_FLOAT datatypes that will enable the use of large values.

    Thanks.

    Tal.

  5. #5
    Join Date
    Aug 2002
    Location
    IL
    Posts
    73
    in 10i (of course).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •