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?
精彩评论