arabic query returns empty result

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • unpresedented
    New Member
    • Feb 2010
    • 11

    arabic query returns empty result

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

    Code:
    SELECT
    
    ge.*, ge.concept AS glossarypivot FROM s_glossary_entries ge WHERE (ge.glossaryid = '161' OR ge.sourceglossaryid = '161') 
    
    AND (ge.approved != 0 OR ge.userid = 361) 
    
    AND concept = 'م' 
    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?
    Last edited by Niheel; Jun 2 '10, 08:31 AM. Reason: punctuation and code tags
  • magicwand
    New Member
    • Mar 2010
    • 41

    #2
    what's the characterset of your database ?

    Code:
    select value from from v$nls_parameters where parameter='NLS_CHARACTERSET';

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      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 ?

      Comment

      • unpresedented
        New Member
        • Feb 2010
        • 11

        #4
        @magicwand:
        I ran the query you've given me, it returned this result: "AL32UTF8"

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

        Code:
        AND concept = 'a'
        I hope to get a solution for arabic letters ...

        Comment

        • unpresedented
          New Member
          • Feb 2010
          • 11

          #5
          if I put a UTF8 character : " ظ… " instead of the arabic character "م" it will work on oracle ...

          Comment

          • amitpatel66
            Recognized Expert Top Contributor
            • Mar 2007
            • 2358

            #6
            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.

            Comment

            • unpresedented
              New Member
              • Feb 2010
              • 11

              #7
              Originally posted by amitpatel66
              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.
              yes you are right ...
              thank you.

              Comment

              Working...