Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Case insensitive selects with 'like'

51828Aug 3 2007 — edited Aug 3 2007
I use a 10g database (10.2.0.2 same behaviour with 10.2.0.1). What we want is case insensitive selects with 'like' operator in the where clause. NLS_COMP is set to 'LINGUISTIC' and NLS_SORT is set to 'BINARY_CI.

In a table we have two columns one of type 'varchar2' one of type 'nvarchar2'. The databases national character set is set to UTF8. Case insensitive sorting works with both columns. Select statements with '.... where varchar2col like '%r%' returns also values with upper case 'R' values (that is what I expect).

The select statements with '.... where nvarchar2col like '%r%' however does not return the row with upper case 'R' values.

I used SQL*Plus: Release 10.2.0.3.0 and other clients and the behaviour is the same so
I think it is not client related.

Is that a known issue or is there any other parameter to set for UTF8 nvarchar columns?

Any hint is very much appreciated! Here are the nls settings in database, instance and session:

DPARAMETER DVALUE IVALUE SVALUE
------------------------------ ------------------------- ----------------- ------------------
NLS_CHARACTERSET WE8ISO8859P1
NLS_COMP BINARY LINGUISTIC LINGUISTIC
NLS_LANGUAGE AMERICAN AMERICAN AMERICAN
NLS_NCHAR_CHARACTERSET UTF8
NLS_RDBMS_VERSION 10.2.0.1.0
NLS_SORT BINARY BINARY_CI BINARY_CI
NLS_TERRITORY AMERICA AMERICA AMERICA
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2007
Added on Aug 3 2007
7 comments
890 views