escape character must be character string of length 1 (ORA-01425 error)
796034Sep 6 2010 — edited Sep 15 2010Hello everyone!
I'm getting this error (SQL Error: ORA-01425: escape character must be character string of length 1) when querying an oracle 9i database with:
SELECT * FROM table WHERE column LIKE '%' ESCAPE '\';
Making it a double backslash (enclosed with apostrophes) would solve the problem, however, with this modification, the query is no longer executable in a 10g database.
Is there a way to make the above SQL code (escape with single backslash) executable in both (and any recent) versions, without modifying it? Perhaps a database server definition that could solve this...
Any suggestions regarding the issue described are greatly appreciated!
Thanks