Generally when we join two table belongs to different databases having different SQL collations gives you below error.
To handle this situation we only need to put “COLLATE DATABASE_DEFAULT” keyword against each attribute to make default collation for both attribute.
FROM InstanceList a
JOIN sys.sysdatabases b on b.Name COLLATE DATABASE_DEFAULT= a.Name COLLATE DATABASE_DEFAULT
Hope this will help you.