The backslash character in a bind variable to the LIKE operator in a SOQL causes ORA-01424
Last updated 2017-06-10 ·Reference W-3566447 ·Reported By 26 users
If a String to which a bind variable refers contains the backslash '\' character and the bind variable is used in the LIKE operator in a WHERE clause of a SOQL, the query execution results in ORA-01424.
Execute the following apex code through workbench or dev console:
String var = 'a\\a';
Account acc = new Account(name = var);
List<Account> l = [select id, name from account where name like :var];
And you will see ORA-01424.
EXCEPTION: System.UnexpectedException: common.exception.SfdcSqlException: ORA-01424: missing or illegal character following the escape character
After all, W-3566447 was created.
I changed GUS Work ID from W-2084999 to W-3566447
Reported By (26)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.