title: Collation conflict with temp table
body: <p>The collation of tempdb is <code>Latin1_General_100_CI_AI</code>. The collation of the database is also <code>Latin1_General_100_CI_AI</code>. Yet the following SQL statement:</p>
  
  <pre><code>SELECT *
  FROM ##CitiesMapping AS cm
  INNER JOIN Cities ON cm.CityName=Cities.Name
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_100_CI_AI" in the equal to operation.
  </code></pre>
  
  <p>The server default collation is also <code>Latin1_General_100_CI_AI</code></p>