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 2008 Forums
 Transact-SQL (2008)
 Match Unicode and non unicode string

Author  Topic 

cipriani1984
Constraint Violating Yak Guru

304 Posts

Posted - 2012-10-31 : 06:21:29
Hi,

If i wanted to match on names, what is the best way to go about with the example below?

Gorska, and górska

I tried a like '% ' + LastName + ' %' and a difference(lastname, lastname) < 2 and it didnt work.

Thanks

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-10-31 : 07:37:01
Depends on the result you are looking for
try

like '% ' + LastName + ' %' collate Latin1_General_BIN
like '% ' + LastName + ' %' collate SQL_Latin1_General_Cp1_CS_AS
like '% ' + LastName + ' %' collate SQL_Latin1_General_Cp1_CS_AI


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -