Solved

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

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

QUERY-
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


ERROR -
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot resolve collation conflict for equal to operation.
0
Comment
Question by:danny__t
[X]
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
5 Comments
 
LVL 6

Accepted Solution

by:
OlegP earned 500 total points
ID: 12122695
vwEmployerMsgs.userTo
tblEmployer.username
have different collation

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

Author Comment

by:danny__t
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!
0

Featured Post

Backup Solution for AWS

Read about how CloudBerry Backup fully integrates your backups with Amazon S3 and Amazon Glacier to provide military-grade encryption and dramatically cut storage costs on any platform.

Question has a verified solution.

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

Suggested Solutions

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
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…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

763 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