Link to home
Start Free TrialLog in
Avatar of enrique_aeo
enrique_aeo

asked on

Cannot resolve the collation - tempdb..#Carriers

i have this code

insert into #Carriers (CarrierTrackingNumber)
select distinct top 1000 CarrierTrackingNumber
from Sales.SalesOrderDetail d
      join #Carriers c on d.CarrierTrackingNumber = c.CarrierTrackingNumber
where d.ProductID = 776

this is error:
Msg 468, Level 16, State 9, Line 524
Cannot resolve the collation conflict between "Modern_Spanish_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
Msg 209, Level 16, State 1, Line 524
Ambiguous column name 'CarrierTrackingNumber'.

SELECT CONVERT (varchar, DATABASEPROPERTYEX('AdventureWorks','collation'));  
SQL_Latin1_General_CP1_CI_AS

SELECT CONVERT (varchar, DATABASEPROPERTYEX('tempdb,'collation'));  
Modern_Spanish_CI_AS
SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial