I am working on a view, wherein I am using an inner join on two tables which are from two different servers. We are using linked server. When running the query I am getting
Adding to the accepted answer, you can used DATABASE_DEFAULT as encoding.
DATABASE_DEFAULT
This allows database to make choice for you and your code becomes more portable.
SELECT MyColumn FROM FirstTable a INNER JOIN SecondTable b ON a.MyID COLLATE DATABASE_DEFAULT = b.YourID COLLATE DATABASE_DEFAULT