vineetu1
14th September 2009, 07:19
Hi,

I find that many times the value in GTM shows as zero but when the same is viewed at database level it shows some other value.

eg.

field t_stoc in tdinv001 is showing as 0 in ttaad4500
while when I see the same by running a query on the database directly it shows the value 7.10542736e-15.

Because of this many times when we are printing reports where we want to ignore zero value records it still prints the report.

It must also be affecting the transacions.

What is the cuase and how to solve it ?

PrinceUK
14th September 2009, 09:43
Check the porting set. There was an issue with certain porting sets not reporting zero as zero on Windows platforms.

baan1612
14th September 2009, 12:26
Hi Vineet,
Please post a reply when you solve this issue. I faced the same issue with tdinv001 table but not with others.

Thanks

dave_23
14th September 2009, 18:52
that's the result of float arithmetic.

when working with float data types sometimes you get values that are not-representable on a computer, so the resulting rounding leaves those types of values in the database.

Baan will generally be unaffected because it will round
0.0000000007 to 0.

but it can mess up any external access.

The only way to solve it is to not use the float datatype, many databases now have datatypes like numeric(X,Y) where x and y are precisions. that handle decimal values well w/o using floating point operations.

But to switch to that would be a major overhaul for baan that would probably take years of work. so i wouldn't expect a "fix" for it soon.

Now, that being said, i believe that baan has released a few fix sessions that basically take any value of nearly "0" in the database and update it to zero.
or you can just do it at the database level
update table set field = 0 where field < 0.001 ;

Dave