Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Unknown error. Help me!!

Author  Topic 

dan_coder
Starting Member

20 Posts

Posted - 2006-07-19 : 08:05:19
Hello guys.

I have two tables. I'm writing a stored procedure to execute a simple inner join between the two table, but I have this error:

Error 446: Cannot resolve collation conflict for equal to operation.

The fields used in the join condition are nVarChar(30).

Have you any idea?

Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-07-19 : 08:08:50
looks like the collation on both side of the equal sign are different.

use sp_help table to view what is the collation of both the tables

and convert from one to another.

where  t1.col collate <collation name> = t2.col



KH

Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-07-19 : 08:16:22
Read about collation in BOL
and
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q325681

Go to design view of each table and check for the Collation property of each field used in JOIN.

Either u can change both to 1 type or
much better way is to use as

Join_Field_1 collate database_default = Join_Field_2 collate database_default



Srinika
Go to Top of Page

dan_coder
Starting Member

20 Posts

Posted - 2006-07-19 : 08:22:52
It's ok!!!!

Thank you!!!!!!!!!!!
Go to Top of Page
   

- Advertisement -