Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
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>
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....
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.