I tried to replicate your issue, but could not. I used both an INT and a VARCHAR(4) for the sumID and still could not reproduce the issue (with the added space in the query). So
1) If the code was copied and pasted, maybe the space was actually not a space, but a character code that displayed as a space. To see if that may have been the case, add a space back in (using space bar), re-run the query and see what happens.
2) I'm (most likely) using a different B4J (5.82), a different JVM (version 1.8.0_144), a different MySQL connector version (mysql-connector-java-5.1.40-bin) and a different MySQL server version (5.6.14) with different encoding (UTF8 for server connection, UTF8 for server char set and UTF8-bin for tables), which may all lead to me not being able to reproduce your issue.