Info on Macro and dividing numbers in @STORE

  • Updated

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.

Example:

@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)

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.