Symptoms
You are using using 'like' or 'escape' on NVARCHAR2 column and you get the following error:
ERROR at line 1:
ORA-01425: escape character must be character string of length 1
Here is an example of possible failing syntax:
SQL> select * from t1 where col2 like '%\$$%' escape '\';
Changes
You may see this problem while setting Cursor_sharing=force.
Cause
The issue is caused by the NVARCHAR2 columns.
The same issue was investigated before in Bug 5726019: ORA-01424 WHEN QUERY USING LIKE WITH ESCAPE OPTION , which was closed as not a bug issue
Since the problematic column is NVARCHAR2, the following syntax should be used:
to_char
or
likec
Solution