SQL syntax error in the SELECT command using LIKE

Problem

You may encounter the following error when retrieving a data using the LIKE operator:

Error number -999 in a SQL statement

ISAM error code number -1064.

Generic database error. Check the native/ISAM error code.

SELECT ... WHERE ... LIKE ? ESCAPE '\'


Solution

The error appears due to Hydra sets an incorrect default escape character for the SQL query. You can add below environment variable to your inet.env config file to prevent adding default escapes:

QXDB_NO_ADD_ESCAPE=1


NOTE: In case you use escape symbol in your code you will need to specifically declare it by using the ESCAPE operator.