If working with numbers that you multiply or divide from stores and you are using fractions please be aware that it might be needed to specify using SQL that you are truly working with decimal numbers.
@STORE1 = 10;
@STORE2 = 3;
@STORE3 = SQL(SELECT CAST(@STORE1 AS numeric(9,6))/@STORE2*100)
@STORE4 = @STORE1/@STORE2*100
MessageBox(@STORE3); //Will show 333.33
MessageBox(@STORE4); //Will show 300 (as it see the numbers as whole integers)
Please sign in to leave a comment.