Re: How to obtain n decimal digits from a floating decimal column?
Posted in 1998
Evelio, Try select round(columnA, 10) That will give you 10 decimal places. Jason On Fri, 06 Feb 1998 09:36:37 +0100, "Evelio Mart'nez" <af.informatica@vlc.servicom.es> wrote: >Hello, >- Lately we are using floating decimal instead of fixed decimal for >every numeric column in the database. >- We have developed a "report compiler" with Informix-RDS 4.0, SE 5.08 >- Every report ends with a "select...". Informix truncate the value of >the floating decimal to 2 digits. >A way to solve this problem ("patch") is to add a multiplication to the >select, i.e. > >select column1*1e7, column2*1e7, column3*1e7 from table ... > >and to dividy by the same quantity before presenting the values. > >If I have 1.23546 in a column I obtain 1.24. Internally it contains all >the digits? > >Is there any way to fix this problem without doing the below process? > >Any ideas? > >Thanks in advance > >Evelio Mart'nez >af.informatica@vlc.servicom.es >evelio.ml@ctv.es > >