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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Storage of numeric data

RE: Storage of numeric data

From: Schauss, Peter <SCHAUPE_at_mail.northgrum.com>
Date: Tue, 16 Jul 2002 08:28:29 -0800
Message-ID: <F001.0049933B.20020716082829@fatcity.com>


Dick,

Thanks for the feedback. At this point it appears that I can hold the users to a predefined size and precision. Does Oracle store fixed point numbers in such a way that you get back exactly what you entered?

Thanks,
Peter Schauss

-----Original Message-----
Sent: Tuesday, July 16, 2002 11:08 AM
To: Schauss, Peter; Multiple recipients of list ORACLE-L

Peter,

    For numeric data where you can't exactly define the size & precision use a
plain old number data type. It's the equivalent of float or double. I do not
allow numeric data to be stored in a char or varchar field because someone sooner or later is going to slide the following into the database "where <field_name> = 0.086" which is equivalent to "where to_number(<field_name>) =
0.086". The bad point here is that the index I'll be asked to create is now useless.

Dick Goulet

____________________Reply Separator____________________
Author: "Schauss; Peter" <SCHAUPE_at_mail.northgrum.com>
Date:       7/16/2002 7:48 AM

We have an mechanical CAD application where we will be storing values like bolt diameter and hole sizes. As far as I know, these numbers will not be used in any computations, but it is important the the number retrieved be exactly what was put in. For example, if they put in 0.086 the should not get out 0.08599).

If I use a format like number(4,3), will this give me the result that I want or should I use char(5)?

thanks,

Peter Schauss
Northrop Grumman Corporation
schaupe_at_mail.northgrum.com
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Schauss, Peter
  INET: SCHAUPE_at_mail.northgrum.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Schauss, Peter
  INET: SCHAUPE_at_mail.northgrum.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jul 16 2002 - 11:28:29 CDT

Original text of this message

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