DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Exponent Issue

  1. #1
    Join Date
    Jan 2001
    Posts
    153
    Hi

    I have a character field which has got the value in EXPONENT FORM..

    EXAMPLE : 5.20626E+11
    The Actual Number Value for this is 520626065025..

    So how do i convert an EXPONENT FORM TO NORMAL FORMAT..


    Vijays

    Vijay.s

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Use to_number function.
    E.g.
    SQL> select to_number('234E5') from dual;

    TO_NUMBER('234E5')
    ------------------
    23400000

  3. #3
    Join Date
    Jan 2001
    Posts
    153
    i ve tried that already!!! take this '5.20626E+11' figure and try whether u r getting 520626065025 by converting it to number !! it wont !!!


    Vijay.s

  4. #4
    Join Date
    Aug 2000
    Posts
    462
    If this is merely a display issue, could you select:

    to_char(YourNumField,'99999999999999999999999999999999999999') from dual;

    ?
    Then if you need to do math, convert it back. The math still works correctly.


  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    The format model for scientific notation is 'EEEE', that is 4 letters "E".

    SQL> set numwidth 12
    SQL> select to_number('5.20626E+11','9.99999EEEE') from dual;

    TO_NUMBER('5.20626E+11','9.99999EEEE')
    --------------------------------------
    520626000000

    SQL>

    HTH,
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

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


Click Here to Expand Forum to Full Width