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...
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...
I think this is what you are looking for...
SELECT name
FROM people
WHERE name like 'Amig%'
SELECT name
FROM people
WHERE name like 'Amig%'
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.
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'
IF 'hôpital'='hopital' COLLATE Latin1_General_CI_AI
PRINT 'YES'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you very much, This is exactly what I was looking for.
thanks a lot.
thanks a lot.
FROM people
WHERE name like '%o'