?
Solved

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

Posted on 2004-09-22
5
Medium Priority
?
312 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 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

752 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