开发者

Formula in expression field for a column

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜