Re: Conversion Problem in Pro*C advice needed

From: Alexander I. Doroshko <aid_at_grant.kharkov.ua>
Date: 7 May 1999 07:46:15 GMT
Message-ID: <01be985d$ad835b40$190114c1_at_sister.grant.UUCP>


[Quoted] You mustn't use float variables for such precision, only double. Moreover, even double doesn't guarantee the 17th digit. If your really need all the 17 digits, use only char variables and make all your arithmetic in embedded sql statements.

-- 
 Alexander I.Doroshko, aid_at_grant.kharkov.ua
 * Bank "Grant", Kharkov, Ukraine
Dogan Cibiceli <dcib_at_gwl.com> wrote in article
<37320E3F.9D28DD92_at_gwl.com>...

: I have a question dealing with Pro*C and Oracle. Suppose I update a
: database column whose type is number(17,2) with a float value in
Pro*C.
: How is the float value converted into number ? Rounded, truncated ??
: Also if I use my sprintf function to change float into a char string
: like sprintf(string,"%.2d",float) with 2 digit precision after the
: point. And Suppose I use this char* value. How much of a difference
can
: I expect ? Does string always reflect correctly what's stored in
: number(17,2) column? Thanks in advance
Received on Fri May 07 1999 - 09:46:15 CEST

Original text of this message