Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
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, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now