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!

String Comparison in Oracle for non english characters

User_3ZQRHMay 6 2016 — edited May 6 2016

Hi ,

I am working in Oracle 11g R2 on AIX platform. I have a question regarding searching non english character in SQl query.

When I am select * from a table I can see the non english characters in the column. The column is a VARCHAR2 column but when I try to give the exact value in the "where" clause I do not see any record as output.

select * from tablename ---> gives 1 record where I can see the value  as Ş in the column

but

select * from tablename where columname ='Ş' --> 0 records

My settings are

NLS_CHARACTERSETAL32UTF8
NLS_NCHAR_CHARACTERSETAL16UTF16

I am few questions.

1. Does Oracle uses ASCII value for string comparison in the "where"clause ?

What I saw the following

select ascii(columnname) from tablename is giving me 50590

where as

select asciistr ('Ş') from dual is giving me 83  ( which is the ASCII value of normal S alphabet)

So if Oracle compares by ASCII value, it is not matching but that brings me to my second question

2. Why is Oracle converting a 'Ş' into a normal S english alphabet ?



Any explanation( or link) will be a great help in clearing my doubt.

Thanks in advance.

This post has been answered by unknown-7404 on May 6 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 3 2016
Added on May 6 2016
4 comments
615 views