This discussion is archived
1 Reply Latest reply: Feb 20, 2013 12:44 AM by BillyVerreynne RSS

Decimal values of an oracle query truncation/Rounding in Unix

992130 Newbie
Currently Being Moderated
Hi ,
The decimal values in any oracle query result queried from unix are getting truncated or rounded up to maintain 9 digits on a whole including digits after precision.

Ex: select 5674385.012 from dual gives 5674385.01
select 56743857.08 from dual gives 56743857.1

Please suggest any fix for this.
Thanks.
  • 1. Re: Decimal values of an oracle query truncation/Rounding in Unix
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    Wrong forum. Please post such questions to the Database {forum:id=61} forum in future.

    Rounding is done by the client or NLS settings - not by the database. Use implicit number-to-string conversion to display the number in human readable format.

    E.g.
    SQL> select 56743857.08 as N from dual;
    
             N
    ----------
    56743857.1
    
    SQL> 
    SQL> select to_char(56743857.08,'999999999.000000') as N from dual;
    
    N
    -----------------
      56743857.080000

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points