By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,141 Members | 823 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,141 IT Pros & Developers. It's quick & easy.

arabic query returns empty result

P: 11
I have this query (that runs on Oracle 10g database):

Expand|Select|Wrap|Line Numbers
  3. ge.*, ge.concept AS glossarypivot FROM s_glossary_entries ge WHERE (ge.glossaryid = '161' OR ge.sourceglossaryid = '161') 
  5. AND (ge.approved != 0 OR ge.userid = 361) 
  7. AND concept = 'م' 
  8. ORDER BY ge.concept 
The query must display all words that begin with the arabic letter "م"
but unfortunately, it returns empty result ..

However, if I run the same query on mysql database, it works well and displays the correct result ..

What should I do in order to get this query working the right way on oracle 10 database?
Jun 2 '10 #1
Share this Question
Share on Google+
6 Replies

P: 41
what's the characterset of your database ?

Expand|Select|Wrap|Line Numbers
  1. select value from from v$nls_parameters where parameter='NLS_CHARACTERSET';
Jun 2 '10 #2

Expert 5K+
P: 8,127
I do not understand how your query display all words that begin with the a particular letter.

Which part of your code does that for you ?
Jun 3 '10 #3

P: 11
I ran the query you've given me, it returned this result: "AL32UTF8"

the query works perfectly with english letters only, and the part of the query that exactly filters by english letter 'a' is:

Expand|Select|Wrap|Line Numbers
  1. AND concept = 'a'  
I hope to get a solution for arabic letters ...
Jun 5 '10 #4

P: 11
if I put a UTF8 character : " ظ… " instead of the arabic character "م" it will work on oracle ...
Jun 6 '10 #5

Expert 100+
P: 2,367
The condition AND concept = 'م' would no way give you the records that "STARTS" with arabic character even though if your characterset is set perfectly.

You will need to use pattern matching in first case in order to get the desired output.
Jun 7 '10 #6

P: 11
yes you are right ...
thank you.
Jun 7 '10 #7

Post your reply

Sign in to post your reply or Sign up for a free account.