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: Oracle and Floating Points

Re: Oracle and Floating Points

From: Kirk Bradley <kbradley_at_us.oracle.com>
Date: 1997/12/10
Message-ID: <kbradley-ya02408000R1012970223180001@192.86.155.100>#1/1

float is still stored in Oracle number format. It's just a question of where the decimal place is set and whether it's enforced when we store back to disk. It does sound like a solution is to change to character on the way to and from the database and in fact, if you were to change the database side most apps would work properly as is.. (from the oracle side at least.. I mean that we will convert the character string to a number and vice-versa as needed)

In article <3487FD06.6C2BFAA8_at_gatwick.geco-prakla.slb.com>, Ian Cary <cary_at_gatwick.geco-prakla.slb.com> wrote:

> dixon_at_tlh.fdt.net wrote:
>
> > I have an Oracle 7.2 database with Delphi 2 front-end applications
> > connected through SQL Links 3.5 and SQL*Net (version 2, I think). I need
> > to do lookups on one table based on a primary key. Unfortunately, the
> > primary key was defined as a NUMBER, which is not always precise (because
> > it's a floating-point). The keys in the database are all stored
> > correctly, but the key I'm searching for sometimes becomes imprecise. If
> > I search for 123456789012, the Oracle engine will look for
> > 123456789011.999. The person who built the database and apps has since
> > left the company, and I now have to fix this problem. I know the proper
> > solution would be to change the column to a VARCHAR2 (or maybe NUMBER(12)
> > - I'm new to Oracle, but I understand that's an integer), but that
> > requires more time than we have available. Does anyone know of a
> > workaround or a later version that solves this problem (although it's not
> > really a bug)? TIA Michael Dixon dixon_at_tlh.fdt.net
>
> Oracle does actually have a FLOAT datatype, which may help.
>
> Regards,
>
> Ian
Received on Wed Dec 10 1997 - 00:00:00 CST

Original text of this message

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