[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SELECT WITHOUT ACCENTS

Posted on 2006-05-12
6
Medium Priority
?
556 Views
Last Modified: 2008-02-26
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...
0
Comment
Question by:eduelrei
6 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 16670245
SELECT name
FROM people
WHERE name like '%o'
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 16670276
I think this is what you are looking for...

SELECT name
FROM people
WHERE name like 'Amig%'
0
 

Author Comment

by:eduelrei
ID: 16670282
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.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 20

Expert Comment

by:Sirees
ID: 16670289
You can use accent insenstive collation for your comparisions like

IF 'hôpital'='hopital' COLLATE Latin1_General_CI_AI
PRINT 'YES'
0
 
LVL 20

Accepted Solution

by:
Sirees earned 2000 total points
ID: 16670315
In your query you can do as

SELECT name
FROM people
WHERE name like 'Amigo' COLLATE Latin1_General_CI_AI
0
 

Author Comment

by:eduelrei
ID: 16674164
thank you very much, This is exactly what I was looking for.
thanks a lot.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question