Solved

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

Posted on 2004-09-22
5
309 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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 …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

707 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