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: Precision in numbers

Re: Precision in numbers

From: Graham Miller <lgmiller_at_elmrd.u-net.com>
Date: 1997/06/03
Message-ID: <339459ff.3586272@news.u-net.com>#1/1

Hello,
  Just a suggestion:

  1. For each reading obtained from a user, store its precision in the database. This means determining the precision when the number is entered (not difficult i think) or asking the user to enter the precision (or provide a guess from the input and let them override it). Whatever, at this point, life should be a lot easier for working with the values as the round function should easily let you work with them and display them to the required precision.

You would not need to use text fields, just number columns with a couple of columns for the precision.  

graham (aka grumpy)

"Bruce Murphy" <murphbd_at_infinet.com> wrote...

| I work for a research lab where precision is very important. I was asked
| today to allow for a numeric field to be able to allow different precision
| to be held and not be changed by the database. For example:
|
| 3.12 would be added for a sample.
| 3.124 would be added for another sample
|
| The user (engineers) does not want the precision to be lost. If the field
| is defined as a double or float with four decimal places the numbers are
| stored as:
|
| 3.1200
| 3.1240
|
| How can one get the precision to be maintained for both reporting and
| calculations? Thanks for any help!
|
| One thought we had was to use a text field and then use the conversion to
| number, but I don't like this approach.
|
|
| Bruce Murphy

Graham Miller ...
Opinions expressed are mine, they are free, and worth exactly what they cost. Received on Tue Jun 03 1997 - 00:00:00 CDT

Original text of this message

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