Cannot resolve collation conflict for equal to operation WHEN using collate database_default???

Posted on 2004-09-22
Last Modified: 2012-05-05
Please can someone tell me why the following query is causing this error:

SELECT DISTINCT dbo.tblEmployer.username,
                          (SELECT     COUNT(vwEmployerMsgs.Id)
                            FROM          vwEmployerMsgs
                            WHERE      vwEmployerMsgs.userTo collate database_default = tblEmployer.username collate database_default AND vwEmployerMsgs.viewed = 0) AS newMsgs

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot resolve collation conflict for equal to operation.
Question by:danny__t
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

OlegP earned 500 total points
ID: 12122695
have different collation

if vwEmployerMsgs.userTo have collation A tblEmployer.username have collation B
try vwEmployerMsgs.userTo  = tblEmployer.username collate A

Author Comment

ID: 12126319
foolish me, it was the queried queries that still had collation issues, collation was a new one on me and very much came unexpectedly!

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

740 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