Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 collation conflict

Author  Topic 

Mehala
Starting Member

7 Posts

Posted - 2012-05-16 : 10:16:03
Hi friends,
am facing problem in sql

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


what i have to do?

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-05-16 : 10:38:58
Force the collation on one side or the other to match the collation on the opposite side. For example, if you were comparing col1 and col2 in a where clause and col1 had SQL_Latin1_General_CP1_CI_AS collation and col2 had SQL_Latin1_General_CP437_CI_AS collation, you could do one or the other of the following:
SELECT * FROM yourTable WHERE 
col1 COLLATE SQL_Latin1_General_CP437_CI_AS = col2;

-- or this

SELECT * FROM yourTable WHERE
col1 = col2 COLLATE SQL_Latin1_General_CP1_CI_AS;
Go to Top of Page

Mehala
Starting Member

7 Posts

Posted - 2012-05-16 : 11:55:17
yes, same thing i did,
column am comparing is integer

how to collate on int dataytpe column
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-05-16 : 12:08:22
quote:
Originally posted by Mehala

yes, same thing i did,
column am comparing is integer

how to collate on int dataytpe column


The error message is not coming from the integer column comparison. Can you post the DDL for the tables and your query?
Go to Top of Page
   

- Advertisement -