Home » SQL & PL/SQL » SQL & PL/SQL » arabic text in where condition (oracle 9.2)
arabic text in where condition [message #353230] Mon, 13 October 2008 01:05 Go to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
hi all,

im running to this problem since two, i havent found anything good yet. i hope i can get good results from u all guys.

the problem is i have a table with one column in arabic and now i want to query from that column so i tried with this sql statement.

select * from bankname where bankarabicname like N'%بنك%'

but no results are displayed, whereas there are more than 20 records.

please help me in resolving my problem.

thanks
fairozkhan
Re: arabic text in where condition [message #353232 is a reply to message #353230] Mon, 13 October 2008 01:08 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post "desc bankname".
Check your NLS parameters.

Also please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.

Regards
Michel
Re: arabic text in where condition [message #353233 is a reply to message #353232] Mon, 13 October 2008 01:10 Go to previous messageGo to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
hi
NLS_CHARACTERSET WE8MSWIN1252
NLS_NCHAR_CHARACTERSET AL16UTF16

regards
fairozkhan
Re: arabic text in where condition [message #353246 is a reply to message #353233] Mon, 13 October 2008 01:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post "desc bankname".

Quote:
NLS_CHARACTERSET WE8MSWIN1252
NLS_NCHAR_CHARACTERSET AL16UTF16

Are these your database, instance or session parameters?
I need your session parameters, your NLS_LANG for instance.

Regards
Michel
Re: arabic text in where condition [message #353251 is a reply to message #353246] Mon, 13 October 2008 01:39 Go to previous messageGo to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
HiMichel

NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA

Regards
Fairozkhan
Re: arabic text in where condition [message #353252 is a reply to message #353251] Mon, 13 October 2008 01:40 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And character set.
And table description.

(Last time I ask.)

Regards
Michel
Re: arabic text in where condition [message #353253 is a reply to message #353252] Mon, 13 October 2008 01:43 Go to previous messageGo to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
table has bank details with english name and arabic name, i want to search depending on the arabic name from the DB. the character set of DB is AL16UTF16.

regards
fairozkhan
Re: arabic text in where condition [message #353259 is a reply to message #353253] Mon, 13 October 2008 02:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Ok, I give up.

Regards
Michel
Re: arabic text in where condition [message #353260 is a reply to message #353259] Mon, 13 October 2008 02:01 Go to previous messageGo to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
hi michel

can u tel me what is the problem, that can be achieved or not?

thanks
fairozkhan
Re: arabic text in where condition [message #353268 is a reply to message #353260] Mon, 13 October 2008 02:39 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I can't until you answer my questions.

Regards
Michel
Re: arabic text in where condition [message #353269 is a reply to message #353268] Mon, 13 October 2008 02:40 Go to previous messageGo to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
so please tel me, how do get the character set as im new to oracle

thanks
fairozkhan
Re: arabic text in where condition [message #353275 is a reply to message #353269] Mon, 13 October 2008 03:21 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I need your session parameters, your NLS_LANG for instance.

Also
Quote:
Post "desc bankname".


Regards
Michel
Re: arabic text in where condition [message #353276 is a reply to message #353275] Mon, 13 October 2008 03:27 Go to previous messageGo to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
hi michel

i got this output

NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE

from select * from nls_session_parameters;

thanks
fairozkhan
Re: arabic text in where condition [message #353325 is a reply to message #353230] Mon, 13 October 2008 05:43 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Quote:
select * from bankname where bankarabicname like N'%بنك%'

What is the 'N'??

Rajy
Re: arabic text in where condition [message #353329 is a reply to message #353325] Mon, 13 October 2008 05:48 Go to previous messageGo to next message
imfairozkhan
Messages: 8
Registered: October 2008
Junior Member
N is used as escape character for national character set
Re: arabic text in where condition [message #353330 is a reply to message #353230] Mon, 13 October 2008 05:52 Go to previous message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Aha! Thank you!!

Rajy
Previous Topic: Mysterious where clause with japanese
Next Topic: plsql procedures sending field as parameter
Goto Forum:
  


Current Time: Wed Dec 07 02:49:22 CST 2016

Total time taken to generate the page: 0.11772 seconds