Subject | RE: [IBO] retrieving size and precision of numeric fields |
---|---|
Author | Salim Naufal |
Post date | 2003-06-09T08:37:12Z |
Hi Peter,
You are correct that 100 cannot be divided by three. The rounding is done by
the TBCD fields and therefore, you should get 33.33 for the first two credit
fields and then, to compensate, I get the difference and store it in the
third credit field. In this case, I get 33.34 for the third field. The point
is that the rounding is done in IBX to 2 digits which is what matched the
numeric(18,2) and in IBO to 4 digits which is incorrect.
You are correct that 100 cannot be divided by three. The rounding is done by
the TBCD fields and therefore, you should get 33.33 for the first two credit
fields and then, to compensate, I get the difference and store it in the
third credit field. In this case, I get 33.34 for the third field. The point
is that the rounding is done in IBX to 2 digits which is what matched the
numeric(18,2) and in IBO to 4 digits which is incorrect.