开发者

Formula in expression field for a column

开发者 https://www.devze.com 2023-01-04 16:54 出处:网络
I used an expression for one of my columns in a data table l开发者_JS百科ike this: (col2-col1)*col3/100

I used an expression for one of my columns in a data table l开发者_JS百科ike this:

(col2-col1)*col3/100

col2 and col1 are bigint and col3 is smallint

But, finally as a result it returns a number that is not exactly what it must be.

For example:

(100000-0)*10/100 will return 9999

Why?


Sounds like a rounding issue. Can you switch to a decimal type (rather than int variants) with explicit precision?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号