Link to home
Start Free TrialLog in
Avatar of eduelrei
eduelrei

asked on

SELECT WITHOUT ACCENTS

Hello, easy question for an expert.
I want to retrieve records from my table "people" without considering if the record was wrote with accent or without:

SELECT name
FROM people
WHERE name like 'Amigo'

If I have the person called Amigó in my table (with accent in the o) I want this record.

Thank you

PD: I was investigating the function CONVERT (SELECT CONVERT), but I don't know how...
Avatar of Aneesh
Aneesh
Flag of Canada image

SELECT name
FROM people
WHERE name like '%o'
I think this is what you are looking for...

SELECT name
FROM people
WHERE name like 'Amig%'
Avatar of eduelrei
eduelrei

ASKER

No, my friend, maybe I don't explain clear:

Users of my web site wants to ask for a man who's name is Amigó, BUT they ask for Amigo

My select now is

select name
FROM people
WHERE name like '%Amigo%'

AND obviously Amigó (with accent) is not in the results of the query.
You can use accent insenstive collation for your comparisions like

IF 'hôpital'='hopital' COLLATE Latin1_General_CI_AI
PRINT 'YES'
ASKER CERTIFIED SOLUTION
Avatar of Sirees
Sirees

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you very much, This is exactly what I was looking for.
thanks a lot.