Cannot resolve the collation conflict between "Chinese_prc_ci_as" and "sql_latin1_general_cp1_ci_as" in the equal to opera tion.

Source: Internet
Author: User

Error:

MSG 468, Level 16, State 9, procedure XXXX, line No. 355
Cannot resolve the collation conflict between "Chinese_prc_ci_as" and "sql_latin1_general_cp1_ci_as" in the equal to opera tion.

Solution:

Original statement (Error):

SELECT
A.shopno as DEPTCD, C.[shopcnname] as Deptname,a.todaydate,
SUM (TotalAmount) as Amount
From
#abc A
INNER JOIN dbo. Paymentmaster b on A.tenderno=b.[paymentno]
INNER JOIN dbo. Shopmaster C on A.[shopno]=c.[shopno]

Correct statement after modification:

SELECT
A.shopno as DEPTCD, C.[shopcnname] as Deptname,a.todaydate,
SUM (TotalAmount) as Amount
From
#abc A
INNER JOIN dbo. Paymentmaster b on A.tenderno=b.[paymentno]
INNER JOIN dbo. Shopmaster c on A.[shopno]=c.[shopno] collate chinese_prc_ci_as

Description

Http://msdn.microsoft.com/zh-cn/library/ms184391.aspx

Third, the solution

1. Change the field of one table in the database to the same collation as the field that you want to compare in the other table.

2. Add a SQL fragment like this after the WHERE clause of the SQL statement: Collate CHINESE_PRC_CI_AI_WS

Such as:

Select a.* from a b Where a.a = b.b Collate Chinese_prc_ci_ai_ws


http://blog.csdn.net/xiuhaijuanqiang/article/details/9966379

Cannot resolve the collation conflict between "Chinese_prc_ci_as" and "sql_latin1_general_cp1_ci_as" in the equal to opera tion.

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.