468: Cannot resolve the collation conflict
SQL ServerWhat does it mean?
In an operation (JOIN, UNION, WHERE comparison or equality), two string expressions with different collations met and SQL Server could not resolve which collation to apply. The operation was canceled due to the ambiguity.
Why does it happen?
The compared columns are defined with different collations; most often seen when the database collation differs from the server/tempdb collation, or when tables in databases with different collations are joined. Joining temporary tables (tempdb collation) with permanent tables is a classic trigger.
How to fix it
Specify an explicit collation in the comparison: ... WHERE a.col = b.col COLLATE DATABASE_DEFAULT (or a concrete collation name). Use COLLATE DATABASE_DEFAULT when creating temporary table columns. For a permanent fix, align the affected columns/databases to a single consistent collation. If mismatches with tempdb are frequent, DATABASE_DEFAULT is the most practical fix.
More from this engine
- 3702Cannot drop database because it is currently in use
- 15138The database principal owns a schema in the database, and cannot be dropped
- 1934INSERT/UPDATE failed because the following SET options have incorrect settings
- 4864Bulk load data conversion error (type mismatch or invalid character)
- 916The server principal is not able to access the database under the current security context