I'm trying to run a query like this in SQL Server:
SELECT
a.itemID, a.ItemName
FROM
[SRVR1].[DB1].[dbo].[ItemsOnStock]
WHERE
a.itemID NOT IN (SELECT b.ID FROM [SRVR2].[DB10].[dbo].[InTransItems] b)
The column types are as follows:
a.itemID, nvarchar(80)
a.ItemName, nvarchar(100)
b.ID, nvarchar(100)
When the query run, I get this error:
Cannot resolve the collation conflict between "SQL_Latin1_General_CP850_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
How do I rewrite the query?