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

Home -> Community -> Usenet -> c.d.o.server -> Re: Storing Negative Numbers in Oracle?

Re: Storing Negative Numbers in Oracle?

From: Christopher M. Day <christopher.day_at_rdbms.freeserve.co.uk>
Date: Tue, 23 Feb 1999 19:58:03 +0000
Message-ID: <36D3084B.F1C2665D@rdbms.freeserve.co.uk>


Sussette,

I've just tried this and I get back the correct result, but then I'm using SQL*Navigator, and I think you are using SQL*Plus. I would change your default numwidth value from 9 to 20.

SQL>show numwidth
numwidth 9
SQL>set numwidth 20
numwidth 20

You should get the correct result back now ;)

Chris.

Sussette Blasa wrote:
>
> Hi, I hope someone could help me. I've been trying to figure out how to
> store this number "-118.245169" in a field called "LATITUDE". When
> creating the table, I created the LATITUDE field by using the "number"
> datatype like this: LATITUDE NUMBER(20,9), but it truncates, or actually
> rounds off the number to: -118.2452 . I want to use this value in a
> calculation, but I would like to store it without rounding it off. I'm
> assuming that the negative number is causing it to round off.
>
> Any help would be appreciated...
>
> --Sussette
Received on Tue Feb 23 1999 - 13:58:03 CST

Original text of this message

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