Re: Rounding Problem - 4GL
Posted in 1998
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Uhmm, just a shot in the dark, With a decimal 16,4 you are forcing 4 decimal places . Without it, I think a decimal defaults to two. Try this. A is a decimal (16,4) B is a decimal (16) C is a decimal (16,4) Now A = 7.475 B = 7.475 (which you says is shown as 7.48) Let C == A * 100 Display C Let C == B * 100 Display C So what are the results? Are they different? If so, then you need to specify the number of significant decimal places. Otherwise if they are the same, its only the default display options. -HTH. Just a stab in the dark. joshua@oklahoma.net wrote: > Having rounding problem. AIX 3.2 RISC 6000 informix 4.11 > Database netamt decimal(16,4) = 7.475 > when I equate this field to another field defined as decimal or > decimal(16) the new value is 7.48, however in other circumstances the > last digit may be truncated? Help!! > > Thanks > > Joshua