Reputation: 1691
I have some of the records in Português (Brasil) in my Employee table. I want to get all the records on the basis of search parameter "@name" that have similar names with difference of hyphens, like Sergio and Ségio. So when I type Sergio it show me all the names, even the ones with hyphen as Sérgio.
Here is my sql query:
SELECT * FROM tblEmployee WHERE firstname like '%@pFirstName%'
I am wondering for a solution to convert name parameter to standard us-english language and get the required results.
How can i do this ?
Upvotes: 0
Views: 4012
Reputation: 21757
You can try to specify an accent insensitive collation to force the accents to be ignored, like so:
SELECT * FROM tblEmployee WHERE firstname COLLATE Latin1_General_CI_AI LIKE '%@pFirstName%' COLLATE Latin1_General_CI_AI
Upvotes: 1
Reputation: 831
SQL Server supports multiple languages. Information about all the languages are stored in sys.syslanguages system view. You can run following script in Query Editor and see all the information about each language. Information about Months and Days varies for each language.
Syntax:
SELECT Alias, * FROM sys.syslanguages
Upvotes: 0