Showing posts with label equal. Show all posts
Showing posts with label equal. Show all posts

Friday, February 10, 2012

Cannot resolve collation conflict for equal to operation.

Hy Guys!

I`m having a new problem today!
I Have two Databases, with the same collation configuration. (SQL_Latin1_General_CP1_CI_AS). But when I execute this qery, I got the collation message error:

select * from Cheque C
where
NOT EXISTS
(SELECT A.cmpCod + A.banCod
FROM dbCorporativo.dbo.Agencia A
WHERE
C.chqCmc7Compe + C.chqCmc7Bco
=
A.cmpCod + A.banCod
)

Result
Cannot resolve collation conflict for equal to operation.

This query executes with succes when I execute it like this:
select * from Cheque C
where
NOT EXISTS
(SELECT A.cmpCod + A.banCod
FROM dbCorporativo.dbo.Agencia A
WHERE
C.chqCmc7Compe + C.chqCmc7Bco
=
A.cmpCod + A.banCod COLLATE SQL_Latin1_General_CP1_CI_AS
)

Some suggestions? Since the configuration for the two databases are identical?Ooopppss!! WRONG FORUM!

Sorry guys!|||Diogo,

The model database must have different collation settings, temp databases / tables obtain/inherit the model database settings. When you specify a collation it sets the collation and thus there are no problems.

Cannot resolve collation conflict for equal to operation.

Hi,
I am getting this error while trying to join two tables on two different
databases.
How can I find out the collation on each and how can I make them similar?
Plz help.
Thnx in advanceMay be the collation of the columns participating in the join are not the
same. You can select from information_schema.columns to see the collation of
those columns and pick one collation to be used with COLLATE clause.
Example:
declare @.t1 table(c1 varchar(25) collate SQL_Latin1_General_CP1_CI_AS)
declare @.t2 table(c1 varchar(25) collate SQL_Latin1_General_CP1_CS_AS)
insert into @.t1 values('microsoft')
insert into @.t2 values('microsoft')
select
*
from
@.t1 as t1
inner join
@.t2 as t2
on t1.c1 = t2.c1 collate SQL_Latin1_General_CP1_CI_AS
if you do not use the "collate" clause in the join, you will get same error
that you mentioned.
AMB
"dotnettester" wrote:

> Hi,
> I am getting this error while trying to join two tables on two different
> databases.
> How can I find out the collation on each and how can I make them similar?
> Plz help.
> Thnx in advance

Cannot resolve collation conflict for equal to operation.

Hi, I have this error when running a query:

Cannot resolve collation conflict for equal to operation.

but the situation is that I can run the query perfectly with one user (windows user) but using an standar user, I've got the error, as far as I know the collation feature applies to db's an objects not to users, what can I do to run this query with the standar user? both users have the same permission on the db. Below is the query attached.

Thank you
Gabriel

SELECT B.EmpSupervisorId, a.Info_ID as A_Info_ID,
ISNULL(a.Owner_SSO_ID,'') as A_Owner_SSO_ID,
ISNULL(a.Ref_SSO_ID,'') as A_Ref_SSO_ID,
ISNULL(a.Prev_Owner_SSO_ID,0) as A_Prev_Owner_SSO_ID,
ISNULL(a.MgmtTypeFlag,0) as A_MgmtTypeFlag,
ISNULL(a.CurrentStatusID, 1) as A_CurrentStatusID,
ISNULL(a.PrevStatusID,0) as A_PrevStatusID,
ISNULL(C.ConTypeOption, '') as C_ConTypeOption,
ISNULL(CAST(a.Last_Status_Update_Date AS VARCHAR),'') as A_Last_Status_Update_Date,
ISNULL(B.sfBUID,'0') as A_Bus_Group_ID, 0 AS A_Bus_Group_Seg_ID,
ISNULL(a.Organization,'') as A_Organization,
ISNULL(a.ContactName,'') as A_ContactName,
ISNULL(A.Title, '') as A_ContactTitle,
ISNULL(a.ContactComName,'') as A_ContactComName, ISNULL(a.Phone,'') as A_Phone,
ISNULL(a.NatureOfOppID,'') as A_NatureOfOppID, ISNULL(a.DealAmount,0) as A_DealAmount, ISNULL(CAST(a.Cust_Contacted_Date AS VARCHAR),'') A_Cust_Contacted_Date, ISNULL(CAST(a.Lead_Qualified_Date AS VARCHAR),'') A_Lead_Qualified_Date, ISNULL(CAST(a.Tran_Processed_Date AS VARCHAR),'') A_Tran_Processed_Date,
ISNULL(CAST(a.Quote_Accepted_Date AS VARCHAR),'') as A_Quote_Accepted_Date,
ISNULL(CAST(a.Approved_By_HFS_Date AS VARCHAR),'') as A_Approved_By_HFS_Date,
ISNULL(CAST(a.Funded_By_HFS_Date AS VARCHAR),'') as A_Funded_By_HFS_Date,
ISNULL(a.Lead_In_Amount,0) as A_Lead_In_Amount,
ISNULL(a.Cust_Contacted_Amount,0) as A_Cust_Contacted_Amount,
ISNULL(a.Lead_Qualified_Amount,0) as A_Lead_Qualified_Amount,
ISNULL(a.Tran_Processed_Amount,0) as A_Tran_Processed_Amount,
ISNULL(a.Quote_Accepted_Amount,0) as A_Quote_Accepted_Amount,
ISNULL(a.Approved_By_HFS_Amount,0) as A_Approved_By_HFS_Amount,
ISNULL(a.Funded_By_HFS_Amount,0) as A_Funded_By_HFS_Amount,
ISNULL(CAST(CreationDate AS VARCHAR),'') as A_CreationDate,
ISNULL(a.BusType,'') as A_BusType,
ISNULL(a.NonHFS_XLink_ContactName,'') as A_NonHFS_XLink_ContactName,
ISNULL(a.NonHFS_XLink_Bus_ID,'0') as A_NonHFS_XLink_Bus_ID,
ISNULL(a.Comments,'') as A_Comments, ISNULL(a.ExistCustomerID,'') as A_ExistCustomerID,
ISNULL(a.FinancialNeedID,'') as A_FinancialNeedID,
ISNULL(a.CampaignID,'') as A_CampaignID,
(GEC_HFS_CORE.dbo.GetBusinessDays(Last_Status_Upda te_Date, getdate())-1) as BusDateDiff, ISNULL(A.DealTypeID, '') as A_DealTypeID
FROM tblInformation a
LEFT OUTER JOIN GEC_HFS_LM_SSOInfo B ON A.Owner_SSO_ID = B.sfSSOID
LEFT OUTER JOIN tblContactType C ON a.Bustype = C.ConType_ID
WHERE a.CurrentStatusID NOT IN (9, 10, 11) AND
ISNULL(a.isNoChange,'NO') = 'NO' AND ISNULL(a.IsDeleted,'NO') = 'NO' AND
DATEDIFF(DAY, Last_Status_Update_Date, GETDATE())<> 0 AND
ISNULL(a.isNonHFS, 'NO') = 'NO'
ORDER BY A_Info_IDAdd COLLATE DATABASE_DEFAULT to character-based comparison operations and forget it.|||It is woking now, tks. Any idea why it is necessary to specify this on one account and not with the other? I wuold like to have something to say to the users.

Tks
GAP|||Here's what I think (it may be too far fetched, but I've seen it):

One of the tables has a twin brother under a different schema, which happens to be the standard login. That twin brother somehow was built using different collation. When that user logs on and runs the query (AND since you do not qualify the tables by schema) the twin brother is picked, thus, - collation errors.

Cannot resolve collation conflict for equal to operation.

I'm trying to audit our sql server and getting a collation error. "Cannot
resolve collation conflict for equal to operation." I know 3 of the
databases on this server have a different collation, but I need to find a wa
y
to get around this since I can't change the collation because they are vendo
r
databases. Does anyone have any ideas? I'm at a loss and this is due to our
auditors within the next few days. Thanks in advance for your help! This is
the code I'm using to audit:
DECLARE @.spname VARCHAR (128)
DECLARE @.dbname VARCHAR (128)
DECLARE @.logiNAME VARCHAR (2000)
DECLARE @.cmd VARCHAR (5000)
-- Declare cursor
DECLARE sp_csr INSENSITIVE CURSOR FOR
select name as dbname from sysdatabases
order by name
-- Open the cursor
OPEN sp_csr
-- Loop through all the databases in the database
FETCH NEXT
FROM sp_csr
INTO @.dbname
print @.dbname
WHILE @.@.FETCH_STATUS = 0
BEGIN
SELECT @.cmd = 'Use ' + @.dbname + ' '+ 'SELECT ''ROLE NAME'' = b.name, 30,
''OBJECT NAME'' = c.name, 30,
''ACTION'' = CASE a.action
WHEN 26 THEN ''REFERENCES''
WHEN 193 THEN ''SELECT''
WHEN 195 THEN ''INSERT''
WHEN 196 THEN ''DELETE''
WHEN 197 THEN ''UPDATE''
WHEN 198 THEN ''CREATE TABLE''
WHEN 203 THEN ''CREATE DATABASE''
WHEN 204 THEN ''GRANT_W_GRANT''
WHEN 205 THEN ''GRANT''
WHEN 206 THEN ''REVOKE''
WHEN 207 THEN ''CREATE VIEW''
WHEN 222 THEN ''CREATE PROCEDURE''
WHEN 224 THEN ''EXECUTE''
WHEN 228 THEN ''DUMP DATABASE''
WHEN 233 THEN ''CREATE DEFAULT''
WHEN 235 THEN ''DUMP TRANSACTION''
WHEN 236 THEN ''CREATE RULE''
END,
"TYPE" = CASE c.type
WHEN ''C'' THEN ''CHECK constraint''
WHEN ''D'' THEN ''Default or DEFAULT constraint''
WHEN ''F'' THEN ''FOREIGN KEY constraint''
WHEN ''K'' THEN ''PRIMARY KEY or UNIQUE constraint''
WHEN ''L'' THEN ''Log''
WHEN ''P'' THEN ''Stored procedure''
WHEN ''R'' THEN ''Rule''
WHEN ''RF'' THEN ''Stored procedure for replication''
WHEN ''S'' THEN ''System table''
WHEN ''TR'' THEN ''Trigger''
WHEN ''U'' THEN ''User table''
WHEN ''V'' THEN '' View''
WHEN ''X'' THEN ''Extended stored procedure''
WHEN ''FN'' THEN ''User Defined Function''
END,
ServerName=(select srvname from master..sysservers where srvid = ''0''),
DatabaseName=(SELECT master..sysdatabases.name
FROM dbo.sysfiles INNER JOIN
master..sysdatabases ON dbo.sysfiles.filename =
master..sysdatabases.filename)
, Environment = Case when (select srvname from master..sysservers where
srvid = ''0'') like ''Dev%''
THEN ''DEV''
WHEN (select srvname from master..sysservers where srvid = ''0'') like
''Prod%''
THEN ''PROD''
WHEN (select srvname from master..sysservers where srvid = ''0'')LIKE
''Test%''
THEN ''TEST''
ELSE ''Unknown''END
FROM sysprotects a, sysusers b, sysobjects c
WHERE a.uid = b.uid
AND c.id = a.id
--AND b.name = @.group
ORDER BY b.name, c.name, a.action'
--PRINT @.cmd
EXEC (@.cmd)
FETCH NEXT
FROM sp_csr
INTO @.dbname
END
-- Close and deallocate the cursor
CLOSE sp_csr
DEALLOCATE sp_csrat a glance, i'm not seeing anything jump out - first step would be
capturing the @.cmd that errored, run it separately and narrow down which
exact part is the problem.
It is possible to coerce a query to use a specified collation - after
the criteria. e.g.
...from table1 join table2 on table1.column = table2.column collate
<collation>...
...from table1 where column='some value' collate <collation>
Anita wrote:

>I'm trying to audit our sql server and getting a collation error. "Cannot
>resolve collation conflict for equal to operation." I know 3 of the
>databases on this server have a different collation, but I need to find a w
ay
>to get around this since I can't change the collation because they are vend
or
>databases. Does anyone have any ideas? I'm at a loss and this is due to our
>auditors within the next few days. Thanks in advance for your help! This is
>the code I'm using to audit:
>DECLARE @.spname VARCHAR (128)
>DECLARE @.dbname VARCHAR (128)
>DECLARE @.logiNAME VARCHAR (2000)
>DECLARE @.cmd VARCHAR (5000)
>
>-- Declare cursor
>DECLARE sp_csr INSENSITIVE CURSOR FOR
>select name as dbname from sysdatabases
>order by name
>-- Open the cursor
>OPEN sp_csr
>-- Loop through all the databases in the database
>FETCH NEXT
> FROM sp_csr
> INTO @.dbname
> print @.dbname
>WHILE @.@.FETCH_STATUS = 0
>BEGIN
> SELECT @.cmd = 'Use ' + @.dbname + ' '+ 'SELECT ''ROLE NAME'' = b.name, 30,
>''OBJECT NAME'' = c.name, 30,
>''ACTION'' = CASE a.action
>WHEN 26 THEN ''REFERENCES''
>WHEN 193 THEN ''SELECT''
>WHEN 195 THEN ''INSERT''
>WHEN 196 THEN ''DELETE''
>WHEN 197 THEN ''UPDATE''
>WHEN 198 THEN ''CREATE TABLE''
>WHEN 203 THEN ''CREATE DATABASE''
>WHEN 204 THEN ''GRANT_W_GRANT''
>WHEN 205 THEN ''GRANT''
>WHEN 206 THEN ''REVOKE''
>WHEN 207 THEN ''CREATE VIEW''
>WHEN 222 THEN ''CREATE PROCEDURE''
>WHEN 224 THEN ''EXECUTE''
>WHEN 228 THEN ''DUMP DATABASE''
>WHEN 233 THEN ''CREATE DEFAULT''
>WHEN 235 THEN ''DUMP TRANSACTION''
>WHEN 236 THEN ''CREATE RULE''
>END,
>"TYPE" = CASE c.type
>WHEN ''C'' THEN ''CHECK constraint''
>WHEN ''D'' THEN ''Default or DEFAULT constraint''
>WHEN ''F'' THEN ''FOREIGN KEY constraint''
>WHEN ''K'' THEN ''PRIMARY KEY or UNIQUE constraint''
>WHEN ''L'' THEN ''Log''
>WHEN ''P'' THEN ''Stored procedure''
>WHEN ''R'' THEN ''Rule''
>WHEN ''RF'' THEN ''Stored procedure for replication''
>WHEN ''S'' THEN ''System table''
>WHEN ''TR'' THEN ''Trigger''
>WHEN ''U'' THEN ''User table''
>WHEN ''V'' THEN '' View''
>WHEN ''X'' THEN ''Extended stored procedure''
>WHEN ''FN'' THEN ''User Defined Function''
>END,
>ServerName=(select srvname from master..sysservers where srvid = ''0''),
>DatabaseName=(SELECT master..sysdatabases.name
>FROM dbo.sysfiles INNER JOIN
> master..sysdatabases ON dbo.sysfiles.filename =
>master..sysdatabases.filename)
>, Environment = Case when (select srvname from master..sysservers where
>srvid = ''0'') like ''Dev%''
> THEN ''DEV''
> WHEN (select srvname from master..sysservers where srvid = ''0'') like
>''Prod%''
> THEN ''PROD''
> WHEN (select srvname from master..sysservers where srvid = ''0'')LIKE
>''Test%''
> THEN ''TEST''
> ELSE ''Unknown''END
>FROM sysprotects a, sysusers b, sysobjects c
>WHERE a.uid = b.uid
>AND c.id = a.id
>--AND b.name = @.group
>ORDER BY b.name, c.name, a.action'
>
> --PRINT @.cmd
>EXEC (@.cmd)
> FETCH NEXT
> FROM sp_csr
> INTO @.dbname
>END
>
>-- Close and deallocate the cursor
>CLOSE sp_csr
>DEALLOCATE sp_csr
>|||Change
DatabaseName=(SELECT master..sysdatabases.name
FROM dbo.sysfiles INNER JOIN
master..sysdatabases ON dbo.sysfiles.filename =
master..sysdatabases.filename)
to
DatabaseName=(SELECT master..sysdatabases.name
FROM dbo.sysfiles INNER JOIN
master..sysdatabases ON dbo.sysfiles.filename COLLATE
Latin1_General_CI_AS =
master..sysdatabases.filename COLLATE Latin1_General_CI_AS)|||That worked as far as getting those databases that have a different
collation's info, but I'm still getting errors. Now I'm getting these errors
:
Line 41: Incorrect syntax near 'COLLATE'.
Server: Msg 156, Level 15, State 1, Line 45
Incorrect syntax near the keyword 'like'.
Thanks!
"markc600@.hotmail.com" wrote:

> Change
> DatabaseName=(SELECT master..sysdatabases.name
> FROM dbo.sysfiles INNER JOIN
> master..sysdatabases ON dbo.sysfiles.filename =
> master..sysdatabases.filename)
> to
> DatabaseName=(SELECT master..sysdatabases.name
> FROM dbo.sysfiles INNER JOIN
> master..sysdatabases ON dbo.sysfiles.filename COLLATE
> Latin1_General_CI_AS =
> master..sysdatabases.filename COLLATE Latin1_General_CI_AS)
>

Cannot resolve collation conflict for equal to operation

Hello,
i am getting the following error in SQLServer2000:-
Cannot resolve collation conflict for equal to operation

Sequence Of Operations :
1. Restored a database from a SQLSERver7.0 backupfile into SQLServer2000 database

2. Differences found when the stored proc. 'sp_server_info' was run on SQLSErver2000 and SQLServer7.0

IDENTIFIER_CASE
SQLSERver7.0 SENSITIVE
SQLServer2000 MIXED

COLLATION_SEQ
SQLSERver7.0 :- charset=iso_1 sort_order=bin_iso_1 charset_num=1 sort_order_num=50
SQLServer2000 :- charset=iso_1 sort_order=nocase_iso charset_num=1 sort_order_num=52

3. For the command "select DATABASEPROPERTYEX()" in SQLServer2000
The temporary and master database returns --> SQL_Latin1_General_CP1_CI_AS
The restored database returns --> Latin1_General_BIN

4. I am getting the error in a sp where data is being fetched from 2 temporary tables.
I suppose the backupup database 'Collation' has to match the Master & temdb 'Collation'

How do i change the 'Collation' parameter of the new database so that it matches with the tempdb database ? Will this solve the problem ?Tempdb will use the collation of the model database when the server is started (i.e. tempdb is built).

Use can coerce the collations used in queries to compare using a specific collation.
= (colname collate collationname)

You can change the collation of a database by
alter database collate collationname
this will change the default collation for new tables
For existing ones I think you will have to run alter table scripts.

These may all change the representation of the data though.

Cannot resolve collation conflict for equal to operation

We have loaded a db from a different SQL Server, and now we are trying to recreate some stored procedures. Some procs experience the error "Cannot resolve collation conflict for equal to operation ".

Can we simply create a new db on our target Sql Server, create the tables w/ the default collation sequence, and then use DTS to pull the data and populate the new db? Will this pull the data and store it in the desired collation? Seems like it should - let me know if it will/will not work, or if there's an easier way. Thanks!apparently the default collation of your sql server is not the same as the one from which you loaded the data. you can create a new database with the collation being the same as the one that of the server from which you are getting your data. and your new database will work without you changing anything!!!

Cannot resolve collation conflict for equal operation

Hi, Im having a critical problem.

I have two databases: persons and cars

In database persons I have a table
named persons_class1 as follows:
person_id char(13) not null [primary key]
name varchar(20) not null

In database cars I have a table
named cars_blue as follows:
car_id char(13) not null [primary key]
model varchar(20) not null
person_id char(13) not null

In my program the initial catalog is: cars
and Im executing the following SQL:

select cars_blue.model,persons.dbo.persons_class1.name
from cars_blue,persons.dbo.persons_class1
where cars_blue.person_id=persons.dbo.persons_class1.per son_id

and the following error occurs:
Cannot resolve collation conflict for equal operation

I also tried like instead of = and the error is:
Cannot resolve collation conflict for like operation

what can I do?

Thanks in advance
RolandA collation is the way that characters are compared/sorted. Apparently your personid columns are character based, so at least at first I'd suggest using:select cars_blue.model,persons.dbo.persons_class1.name
from cars_blue,persons.dbo.persons_class1
where cars_blue.person_id COLLATE SQL_Latin1_General = persons.dbo.persons_class1.per son_id COLLATE SQL_Latin1_General-PatP|||Collation does not pertain to the fields that are being compared but to the operator that is used in comparison.

select cars_blue.model,persons.dbo.persons_class1.name
from cars_blue,persons.dbo.persons_class1
where cars_blue.person_id = persons.dbo.persons_class1.per son_id COLLATE SQL_Latin1_General_CP1251_CI_AS|||Collation does not pertain to the fields that are being compared but to the operator that is used in comparison.So you apply the collation to the operator, and once the collation is applied that operator will then compare any two objects? At least as I see it, the comparison operator invokes an operation which is dependant on the collations of both of the objects that are being compared. Did I miss a meeting somewhere?

-PatP|||Great, I solved the problem!!, further Im allowed to change
the default collation of the database.

Thanks!
Roland|||Well, he already solved it, so there is no point to continue, but...The COLLATE tells the optimizer what code page to use while comparing 2 values, not how they need to be collated before comparison can be performed. That's why your syntax will produce an error.|||So then how can this be?SELECT Count(*)
FROM dbo.sysobjects AS a
WHERE a.name = a.name
GO

SELECT Count(*)
FROM dbo.sysobjects AS a
WHERE a.name COLLATE Latin1_General_BIN = a.name

SELECT Count(*)
FROM dbo.sysobjects AS a
WHERE a.name COLLATE Latin1_General_BIN = a.name COLLATE Latin1_General_BIN
GO

SELECT Count(*)
FROM dbo.sysobjects AS a
WHERE a.name COLLATE Latin1_General_BIN = a.name COLLATE Cyrillic_General_BIN
GO-PatP|||Oh for Codd's sake, as you see yourself, the fourth statement will produce an error because you can't perform a comparison after collating 2 values to different code pages. Doesn't it mean to you that only 1 COLLATE statement actually makes sense? In the example below you'll see that regardless of what collation is chosen for a field, COLLATE forces the comparison to be performed using a specified code page. It does not "collate" the values!

begin tran
go
create table #t1 (f1 char(1) collate Cyrillic_General_BIN not null)
create table #t2 (f1 char(1) collate latin1_general_bin not null)
insert #t1 values ('a')
insert #t2 values ('a')
go
select * from #t1, #t2 where #t1.f1 = #t2.f1 collate French_BIN
select * from #t1 inner join #t2 on #t1.f1 = #t2.f1 collate French_BIN
go
rollback tran
go|||Oh for Codd's sake, as you see yourself, the fourth statement will produce an error because you can't perform a comparison after collating 2 values to different code pages. Doesn't it mean to you that only 1 COLLATE statement actually makes sense? In the example below you'll see that regardless of what collation is chosen for a field, COLLATE forces the comparison to be performed using a specified code page. It does not "collate" the values!In your earlier post I thought you said that the collation only applied to the operator, which I assumed meant there could only be one collation for an operator. What operator are you collating within your CREATE TABLE statements?

A collation applies to data, and within SQL Server it specifically applies to character data. You can apply operators to that character data, but you can't apply a collation to the operators. The relational operators (like equal, greather than, etc) use the collation to determine how they can compare the data. This determines things like does case matter, are accents important, what order should the characters sort, etc. Note that one set of rules can be used for sorting and a quite different set can be used for comparisons in some cases within the same collation!

-PatP

Cannot resolve collation - ERROR!

Hello all,

I seem to get the following error when I join two tables from two separate databases.

[[Cannot resolve collation conflict for equal to operation.]]

Using

SELECT DATABASEPROPERTYEX('AAA', 'COLLATION'),
SELECT DATABASEPROPERTYEX('BBB', 'COLLATION')

returns exactly the same answer therefore the default collation order in both databases is the same. Why do I still get this error then?!

I know that you can change it for each individual table but isn't there a better solution?

Your help would be appreciated.Didn't specified which version of SQL is using, if its SQL 2K then you can change COLLATION using ALTER Database .... ALTER TABLE... refer to books online for more information.

If its version 7 then using REBUILDM utility to rebuild the master database for similar collation settings.|||Originally posted by Satya
Didn't specified which version of SQL is using, if its SQL 2K then you can change COLLATION using ALTER Database .... ALTER TABLE... refer to books online for more information.

If its version 7 then using REBUILDM utility to rebuild the master database for similar collation settings.

I am using SQL Server 2000.

The problem is that altering the database to set the collation order to be the same as the other one is what I have done but I still get the same error.

I am not keen on altering the collation order for every table/column hence my original question on this forum.

Your help would be appreciated.|||Refer to this DBJournal (http://www.databasejournal.com/features/mssql/article.php/1587631) article for more information.|||hi,

you might specify the collation directly like this

:
join table on fieldname COLLATE ... = fieldname COLLATE ...
:
and use the same collation for both fields

or have a look at bol "COLLATE"

markus|||Originally posted by msieben
hi,

you might specify the collation directly like this

:
join table on fieldname COLLATE ... = fieldname COLLATE ...
:
and use the same collation for both fields

or have a look at bol "COLLATE"

markus

Thanks for your help but as I said, I am not keen on using collate on every column I happen to use. Mind you, thank God MicroSoft introduced this new command in SQL Server 2000.

I am still trying to figure out why I keep getting the error even though both databases have the same default collation order!|||Originally posted by Crespo-n00b
Thanks for your help but as I said, I am not keen on using collate on every column I happen to use. Mind you, thank God MicroSoft introduced this new command in SQL Server 2000.

I am still trying to figure out why I keep getting the error even though both databases have the same default collation order!

Probably, we could help you more if you'll post the JOIN in the forum.
I got similar error when in a stored procedure I've created a "Table" type variable and used it in a join... all this happened in one database. The problem was solved by creating the "Table" type variable with the current database's collation order.

Hope this helps!

Best regards,
Botond

Cannot resolve collation

Trying tun a script that updates a table and i get the
following error
'Cannot resolve collation conflict for equal to operation.'
Any ideas what causes this?Probably different collations between your system databases and the
application database. Either make sure that the databases has the same
collation or adjust the offending query and specify which collation the
query is to use (using the COLLATE clause).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"mat" <anonymous@.discussions.microsoft.com> wrote in message
news:b7b501c40815$73fe2f30$a301280a@.phx.gbl...
> Trying tun a script that updates a table and i get the
> following error
> 'Cannot resolve collation conflict for equal to operation.'
> Any ideas what causes this?