1 Reply Latest reply: Feb 20, 2013 2:44 AM by Billy~Verreynne RSS

    Decimal values of an oracle query truncation/Rounding in Unix

    992130
      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
          Billy~Verreynne
          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