Posted by hwoess on 06/29/05 17:32
Am 28 Jun 2005 08:22:51 -0700 schrieb Kavitha:
> I have a Users table which contains a nvarchar column LastName. The
> first query below returns me all the records with LastName containing
> "opez" or "ópez" in them. But the second query returns only records
> with "lopez" in the lastname and not records that contain "lópez".
> Can anyone please tell me what is it that i am missing?
>
> SELECT *
> FROM tbUsers
> WHERE (LastName LIKE '%[oó]pez%')
>
> SELECT *
> FROM tbUsers
> WHERE (LastName like '%l[oó]pez%')
>
> thanks
try this:
SELECT * FROM tbUsers
WHERE (LastName like N'%l[oó]pez%')
I think it needs the "N" in front of the string.
bye,
Helmut
Navigation:
[Reply to this message]
|