Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Why do my numbers round/truncate???

Re: Why do my numbers round/truncate???

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 19 Jan 1999 19:28:08 GMT
Message-ID: <36a6dc6f.5159569@192.86.155.100>


A copy of this was sent to stuco_at_mailcity.com (if that email address didn't require changing) On Tue, 19 Jan 1999 15:52:58 GMT, you wrote:

>Oracle 7.3.3
>AIX 4.2
>
>Hi all!
>
>I am selecting from the sum of a number(13,2) column that I know has data
>after the decimal point. But, MY Query is rounding very sporadically.
>Sometimes it rounds, sometimes it doesn't.
>
>My question... WHY!!!
>
>Thanks for all your help.
>
>Stuart Cowen
>Paladin Consulting - Dallas
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

are you in SQLPLUS when this occurrs? (if not, what are you using).... sqlplus uses a numformat for format numbers for display. By default it is a 'smallish' format, consider:

SQL> show numformat
numformat ""
SQL> select 12345678901234567890 from dual;

12345678901234567890


          1.2346E+19

SQL> set numformat 9999999999999999999999999
SQL> select 12345678901234567890 from dual;

      12345678901234567890


      12345678901234567890

SQL> try setting numformat to something bigger (or to_char() numbers to avoid sqlplus formatting them...)  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue Jan 19 1999 - 13:28:08 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US