Menu

Why do some Oracle Numeric Fields show a value of 0 when it has a small decimal value.

0 votes

I have an Oracle Numeric field and I can see the value in the database but when I look at it in dbFront the value shown is 0. Why is that?

The field is defined as "Number".

ALTER TABLE test_data
   ADD bore_variance number;
in Customization by (7.3k points)
edited by

1 Answer

0 votes
 
Best answer

The issue is that you have not defined the Scale and Precision of your Oracle Number() type. An Oracle number that does not have an explicitly defined scale and precision has a range that is crazy large.

It is not that dbFront can't display large numbers. But many users who setup Oracle don't appreciate that by not defining a Number(), they are setting themselves up to work with numbers that have a range of 1.0 x 10(-130) up to but not including 1.0 x 10(126).

​​https://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements001.htm#sthref119

​This would mean that I would have to setup a multi-line field to cover the 132 possible digits that a user could enter for each of those numbers when the user is likely only expecting to enter something like 123.45.

To deal with that, all Oracle numbers without a defined scale and precision are treated as Number(16,4).

​The dbFront logfile also creates a log entry for all undefined fields explaining what it has done.

​The request is that you just define the oracle numeric type and set a reasonable range.

by (65.1k points)
selected by
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...