My Oracle Support Banner

A query using like predicate causes ORA-1560 (Doc ID 2289850.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Standard Edition - Version 12.1.0.1 and later
Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
Information in this document applies to any platform.

Symptoms

 A query using like predicate causes ORA-1560.

This is caused when concatinating bind bariables including more than 22 multibyte characters and a character '%'.


SQL> var dname varchar2(64 char)
SQL> exec :dname :='<Multibyte character>....';
SQL> SELECT count(*) FROM scott.emp WHERE ename LIKE :dname || '%' ;
SELECT count(*) FROM scott.emp WHERE ename LIKE :dname || '%'
*
ERROR at line 1:
ORA-01560: LIKE pattern contains partial or illegal character

 (In this case, multibyte charcters set into a bind variable before executing a query)

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.