[Webinar] Streamline your web hosting managementRegister Today


Cannot resolve collation conflict for equal to operation

Posted on 2008-02-06
Medium Priority
Last Modified: 2010-08-05
In one of my query, its giving the following error from GUI.  If I execute the same query in SQL Query Analyzer the error message is the same.

Server: Msg 446, Level 16, State 9, Line 1
Cannot resolve collation conflict for equal to operation.

We have an application which supports DB2 as well as SQL Server.

The same query works fine in DB2.

Also, I dont not want to append 'collate' keyword infront of VARCHAR type columns as this will require a change in query which will not work for DB2.

Please suggest a solution which can be applied on database and not on query.

Thanks in advance

Question by:ajexpert
  • 2
LVL 39

Expert Comment

ID: 20837013
if you dont want to add collate keyword in the sql, you need to identify the columns used in the query's where clause and make them to use same collation at database level.
LVL 14

Author Comment

ID: 20837063
Hi appari,
Can you please provide the syntax for the same?

LVL 39

Accepted Solution

appari earned 300 total points
ID: 20837098
syntax is :
alter table tableName
alter column columnName datatype collate collationName


alter table ALL_CODES
alter column CODE_NM varchar(60) collate Japanese_CS_AS

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

612 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