SQLCODE -007
SQL0007 Character not valid in the statement
- IBM message text
- Character &1 (HEX &2) not valid in SQL statement.
- SQLCODE
- -007
- SQLSTATE
- 42601
Most common cause
The statement contains a character SQL does not accept: typically typographic quotes pasted from Word, Teams or an email.
Other causes
- Non-printable characters in the source.
- A CCSID problem that turns one character into another.
How to fix it
The message gives the character and its hex value. Retype quotes and apostrophes, or paste into a plain text editor first; check the source CCSID.
Related errors
Text and codes from IBM documentation for 7.6. Checked on .