Resolving collate conflicts in SQL Server

Source: Internet
Author: User

You encounter collate conflicts when using SQL to query a table, such as:

Select  from [dbo]. VmimageunionSelect from [dbo]. [Dicvmimage]

Get the error:

468  - 9 1  "chinese_prc_ci_as" "sql_latin1_general_cp1_ci_as"   in the UNION operation.

The initial suspicion may be due to the collate conflict of the two table in the DB, the right-click "Properties" View, All "Chinese_prc_ci_as", is a match.

Later looked at the Server and DB respective collate found, Server:sql_latin1_general_cp1_ci_as db:chinese_prc_ci_as, thought to modify the collate of the DB as "sql_latin1_ General_cp1_ci_as "It's OK, but it's still not working.

The simplest method was discovered later:

Select  from [dbo]. VmimageunionSelect from [dbo]. [Dicvmimage]

That is, when we use a table, we turn to "Database_default" for fields that may conflict.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.