Error Cannot resolve the collation conflict between SQL Latin1 General CP1 CI AS and Arabic CI AS in the equal to operation

0 votes

I am working on a view wherein I am using an inner join on two tables which are from two different servers. We are using linked server. When running the query I am getting this message:

Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Arabic_CI_AS" in the equal to operation.

I don't know much about collation. Searching through internet I find solutions to use COLLATE, but the concept of COLLATE is not clear to me. Will it change anything for any of the databases? I am looking for a solution without changing anything for the databases.

Help me out please!!

May 13, 2020 in Database by kartik
• 37,520 points
20,543 views

1 answer to this question.

0 votes

Hello @kartik,

You can resolve the issue by forcing the collation used in a query to be a particular collation, e.g. SQL_Latin1_General_CP1_CI_AS or DATABASE_DEFAULT. 

For example:

SELECT MyColumn
FROM FirstTable a
INNER JOIN SecondTable b
ON a.MyID COLLATE SQL_Latin1_General_CP1_CI_AS = 
b.YourID COLLATE SQL_Latin1_General_CP1_CI_AS

In the above query  a.MyID and b.YourID would be columns with a text-based data type. Using COLLATE will force the query to ignore the default collation on the database and instead use the provided collation, in this case SQL_Latin1_General_CP1_CI_AS.

Hope this helps you!!

Thank You!!

To know more about SQL, It's recommended to join SQL Online Course today.

answered May 13, 2020 by Niroj
• 82,840 points

Related Questions In Database

0 votes
1 answer
0 votes
1 answer

Error: Cannot connect to the server using SA account - MSSQL Linux

The option is to reset the system ...READ MORE

answered Mar 17, 2019 in Database by Fatima
864 views
0 votes
1 answer

Can you please explain the difference between inner join and outer join in database?

Hi Suraj, You have a doubt regarding inner join ...READ MORE

answered May 28, 2019 in Database by sampriti
• 1,120 points
1,151 views
0 votes
1 answer

What is the difference between HAVING and WHERE in SQL?

HAVING: It is used to check after the aggregation ...READ MORE

answered Feb 17, 2022 in Database by Vaani
• 7,070 points
776 views
0 votes
1 answer
0 votes
0 answers

Anyone can help me out to understand the semantic of (document.getElementBYId("demo").innerHTML="Hello") ?

Hello guys, Can Someone helps me to find ...READ MORE

Jan 17, 2020 in Web Development by anonymous
• 37,520 points
935 views
+1 vote
1 answer

What is the relationship between angularjs Scope with controller/view?

Let us consider the below block: <div ng-controller="emp"> ...READ MORE

answered Jan 20, 2020 in Web Development by Niroj
• 82,840 points

edited Jan 21, 2020 by Niroj 1,144 views
0 votes
1 answer

What is data binding in AngularJS?

Data binding is synchronization of data between the ...READ MORE

answered Jan 23, 2020 in Web Development by Niroj
• 82,840 points
1,121 views
0 votes
1 answer

error while Retrieving the subquery column in where condition to main query

Hello @Jyra, You should first pay attention to ...READ MORE

answered Sep 4, 2020 in Database by Niroj
• 82,840 points
1,305 views
0 votes
1 answer

Sir please tell me how to import image in database?

Hello soumadip, (Assuming you are using mysql database) You ...READ MORE

answered Apr 1, 2020 in Database by Niroj
• 82,840 points
1,005 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP