SQLServer 7 and 2000: Cannot resolve collation conflict for equal to operation -
02-08-2006
, 09:57 AM
Hi,
I am getting the above error while I try to compare two tables from
diffrent databases.
This occured when we tried to migrate from sql server7 to sql
server2000.
We have changed the schema also in the new database. e.g.
my old table (olddb)
SI_USER(SI_COMPANY_ID, SI_USER_CODE)
my new table (newdb)
SI_USER(SI_COMPANYID, SI_CODE)
We are comparing this for the process of data migration to the new
database(2000).
Here is the sample query which is failing.
SELECT *
FROM [olddb].[dbo].[SI_USER] SV
WHERE [SI_COMPANY_ID] = 56
AND [SI_USER_CODE] NOT IN
(
SELECT [SI_CODE]
FROM [newdb].[spartacus].[SI_USER]
WHERE [SI_COMPANYID] = 1
)
The collation of the both databases were different, we later fixed to a
same collation
still the problem persists.
Here are the steps I followed.
1. Took the backup of db instance in sql server7
2. Restored it as a new database in sql server2000.
3. Created a new database instance in sql server2000
4. Generated the new schema in the new db instance.
5. Ran the above query from 'query analyzer' of sql server2000
Hope someone in this group can throw some light into this issue.
-Thanks in Advance,
Maymon. |