Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Storing Negative Numbers in Oracle?
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