Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Searching for accented characters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-19 : 11:21:04
Jim writes "We would like to be able to search for names with accented characters WITHOUT using the accented characters. For example:

Jason Dupré

If we search for Jason Dupre, we don't get a match.

Is there a T-SQL solution to this? Do I need to store the name both ways? HELP!!!"

Jay99

468 Posts

Posted - 2002-03-19 : 11:57:41

declare @name varchar(30), @search varchar(30)
set @name = 'Dupré'
set @search = 'Dupre'
select @search = replace(@search,'e','[e,é]')
select 'found' where @name like @search


you will have to set up your rules and build the REPLACE intel. into your search proc.

Jay
<O>
Go to Top of Page

nmg196
Yak Posting Veteran

70 Posts

Posted - 2002-03-19 : 14:28:17
I seem to remember that there's a way to make a field accent insensitive for search purposes... Something to do with the coalation or something. Have a look at the properties of the table you're searching on under coalation.

It's definitely possible, but I can't get to my DB at the moment to see what I did.

Nick....

Go to Top of Page

Jay99

468 Posts

Posted - 2002-03-19 : 14:52:48
quote:

I seem to remember that there's a way to make a field accent insensitive for search purposes... Something to do with the coalation or something. Have a look at the properties of the table you're searching on under coalation.

It's definitely possible, but I can't get to my DB at the moment to see what I did.

Nick....





Yeah, in SQL 7 its accent-insensitive Sort Order.

just remember...
quote:
The sort orders available depend on the character set you chose. You cannot have different databases with different sort orders on the same server. In addition, you cannot back up and restore databases between servers configured for different sort orders.

Important It is critical that you select the correct sort order when you install SQL Server. If you need to change sort orders after installation, you must rebuild your databases and reload your data.




Jay
<O>
Go to Top of Page
   

- Advertisement -