By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

SQL Error: Cannot resolve the collation conflict between "SQL_Latin1_General_

Uncle Dickie
P: 67
Hi All,

I am getting the error:
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
when I run a query I have written.

The SQL I have written is pretty long (I can post it if needed but don't want to confuse things too much!), but basically it goes something like this:

Create temporary table #temp1.
Insert Into #temp1 (x 2)
Do some grouping and create (SELECT INTO) new temp table #temp2
New query joins to #temp2 on a field called PartNumber

Having read a few things I guess it is a problem with the table I create originally and that I need to have different 'Collate' settings for this column. How would I go about setting this in the CREATE table section of my code or am I going in the wrong direction?

Any help is appreciated
Apr 27 '09 #1
Share this Question
Share on Google+
2 Replies

Uncle Dickie
P: 67
Panic over!

I found what was needed; adding the COLLATE is done when creating the column

Expand|Select|Wrap|Line Numbers
  1. CREATE TABLE #temp1 (OrigPartUK nvarchar(25) COLLATE SQL_Latin1_General_CP1_CI_AS)
Apr 27 '09 #2

Expert 2.5K+
P: 2,878
If you find a situation that you can no longer re-create any tables nor your queries, add a COLLATE 'collation name' on every string comparison in your query, i.e. where and join conditions.

--- CK
Apr 29 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.