Joining SQL tables with different collation

This will be a very short read but I think someone can find this post useful in the future (probably that will be me) because there are a lot of misguiding answers out there. I’ll show one practical example on where you can hit this TSQL problem and an easy solution on how to resolve it.

simpsons.jpg
* absolutely no clue what image to attach to this post so we might go with this one until better idea comes up *

The problem

We need to retrieve only the from T1 table in the DB1 database and join them with the T2 tableĀ  in the DB2 database by the T1.Name and T2.Name with the condition that T1.Name needs to starts with T2 name we need to run this query. Read More »