Greetings,
I have an expression in a precedence constraint that is returning false when it should return true. This is the expression that returns false:
((5500 / 9990) * 100) > 10
The following expression returns true. I did the division (5500 / 9990) myself and substituted the resulting value:
((0.55055055055055055055055055055055) * 100) > 10
Why is the first expression returning false? I'm stuck in the mud up to my axles on this and I know I'll probably feel like a fool when I learn the answer...
Thanks,
BCB
The expression is return false because zero times 100 is less than 10. The first part is performing integer division, not decimal division.Cast one of the operands to a decimal type, and you will get the result you're looking for.
(( (DT_DECIMAL, 0) 5500 / 9990) * 100) > 10|||
Hello jaegd,
Thanks for putting me wise on this one.
Regards,
Black Cat Bone
No comments:
Post a Comment