Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collation mismatch
Message
 
 
To
12/01/2021 13:21:20
General information
Forum:
Microsoft SQL Server
Category:
Troubleshooting
Miscellaneous
Thread ID:
01677816
Message ID:
01677817
Views:
45
Hi,

Did you try to get the same info from the INFORMATION_SCHEMA.COLUMNS to see where this column is used (in which table)?

BTW, I often get this error when using temp tables and then joining with the real table. When you're creating a temp table with CREATE TABLE command make sure to always add COLLATE DATABASE_DEFAULT to all character columns.

>I am getting an error, Cannot resolve the collation conflict between xxx and yyy in the equal to operation.
>
>When I am checking the collation setting, strange thing is that I get two records:
>
>SELECT
> col.name, col.collation_name, Object_ID('Spouse'), Object_Name(Object_ID('Spouse'))
>FROM
> sys.columns col
>WHERE
> col.name = 'spFirst'
>
>SpFirst SQL_Latin1_General_CP1_CI_AS 187915791 Spouse
>spFirst Latin1_General_CI_AS 187915791 Spouse
>
>So the second row show the same field name in lower case with a different collation than the table has.
>
>EXEC sp_help Spouse
>Shows only fields with the correct collation. Where does this second collation come from, and how can I modify the mismatched collations?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform