Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
Oracle performance tuning 

software
 
Oracle 

performance Tuning 10g reference poster
 
Oracle training in Linux 

commands
 
Oracle training 

Excel
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> Diacritics in in like clause, Globalization support
Ana
post Dec 27 2004, 05:59 AM
Post #1


Newbie
*

Group: Members
Posts: 3
Joined: 27-December 04
Member No.: 1,176



Hello, huh.gif

I use to write clauses like that to ignore case sensitive and diacritics :

alter session set nls_comp=ANSI
/
alter session set nls_sort=generic_baseletter
/
select * from tab28
where lastName = 'Médar'

Result

lastName
---------

Medar
médar
MEDAR
medar

Next day, i try this, to find everyone witch last name is beginning by Médar ignoring diacritics and case sensitive :

alter session set nls_comp=ANSI
/
alter session set nls_sort=generic_baseletter
/
select * from tab28
where lastName like 'Médar%'

and Oracle told me he doesn't find any thing !!!

Does anyone know how to resolve this problem ? i'm using Oracle 9i.

Thanks a lot ...

Ana
Go to the top of the page
 
+Quote Post
burleson
post Dec 27 2004, 08:41 AM
Post #2


Advanced Member
***

Group: Members
Posts: 7,960
Joined: 26-January 04
Member No.: 13



smile.gif

Hi,

Oracle10g release 2 has a new feature that does case insensitive searches:

http://www.oracle.com/corporate/press/2004_dec/open12.html

However, you would have to go to great lengths to ignore diacritics.

I would write a built-in function in PL/SQL to transform the query to whatever for it resides in the database:

select stuff from tab where lastName = transform_string('Médar');


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
Ana
post Dec 27 2004, 09:47 AM
Post #3


Newbie
*

Group: Members
Posts: 3
Joined: 27-December 04
Member No.: 1,176



Thanks,

But, i'm quite confused coz the data can have diacritics or not, can be in upper case or not, it's very heterogeneous.

I want to find all the clients whose name is beginnig with 'médar' or 'Médar' or 'MEDAR' or 'medar' or 'MEdar' and so on ...

I don't really see how to write a pl/sql function in this case : trying all combinaisons of characters will spent a very long time ?


Ana wacko.gif
Go to the top of the page
 
+Quote Post
burleson
post Dec 27 2004, 10:10 AM
Post #4


Advanced Member
***

Group: Members
Posts: 7,960
Joined: 26-January 04
Member No.: 13



smile.gif

Hi Ana,

Oh! Using the LIKE parameter is an whole new issue:

http://www.dba-oracle.com/t_oracle10g_rele...ve_searches.htm

Here is a discussion on case insensitive searches with the "LIKE operator":

http://www.iherve.com/oracle/case_ins.htm

Also, this from the Kim Floss book:

http://www.oracle-training.cc/cbo_194.htm


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
Ana
post Dec 27 2004, 11:37 AM
Post #5


Newbie
*

Group: Members
Posts: 3
Joined: 27-December 04
Member No.: 1,176



Hi,

I'm using actually Oracle 9i, it seems that Oracle 10g release 2 is up to date for my request.

Trying to catch a trial version...

Thanks wink.gif

Ana
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 3rd September 2010 - 02:51 AM