AnsweredAssumed Answered

SQL returns error in calculation

Question asked by Powerbook on Oct 12, 2015
Latest reply on Oct 12, 2015 by Powerbook

Yesterday something strange has happened once I tried to type a number from a numeric keypad that has "." instead of ",".

Since I'm in Europe and we use "comma" to determine decimals, once I used the point the value appears as a full number es:


Typed 120.00 and got 12000. And up to this all was ok, I prevented the error to happen again and I used during input this formula

Substitute ( Self ; "." ; "," )

From now on any kind of comma or point will be interpreted correctly.

All ok up to now.


Then I need to extract some numbers, I I did it with this SQL script:


Sum (

ExecuteSQL (

"SELECT SUM (\"Entrate\")

FROM \"Movimenti\"

WHERE (\"Causale 3\") = ?"

; "" ; "" ; "P9B");


ExecuteSQL (

"SELECT SUM (\"Uscite\")

FROM \"Movimenti\"

WHERE (\"Causale 3\") = ?"

; "" ; "" ; "P9B")*-1



and that has happened is that I get a wrong totals number from only those field I inserted with the wrong decimal.

Although I before edited the correct number in the table. In Fact they do display correctly on their Layouts. But NOT in the SQL Global Variable $$P9B




It looks as if hidden numbers are used for calculation. I HAVE NO CLUE!!


Can anybody help me?

Thank you