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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/12/05
Message-ID: <348750c5.12782179@inet16>#1/1

All oracle numbers are stored internally as a varying length string in the database (upto 22 bytes in length, giving 38 digits of precision). The problem in this case is not in the database but rather the front end.

Do you, in delphi, have any control over the datatype delphi is using to hold the numbers before it sends them? It is delphi that is sending 123456789011.999. They must be putting the number into a C float on the client and sending that over. Can you somehow talk delphi into either using a STRING in the client application or using an int?

Many, many applications use NUMBER as the primary key (its not unfortunate, its very common).

>dixon_at_tlh.fdt.net
 

> 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
>
> -------------------==== Posted via Deja News
> ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Dec 05 1997 - 00:00:00 CST

Original text of this message

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