Cannot resolve the collation conflict between "Chinese_prc_ci_as" and "sql_l and the problem of NULL query results due to different collation rules

Source: Internet
Author: User
Tags getdate

Error: Cannot resolve the collation conflict between "Chinese_prc_ci_as" and "sql_l

Cause of Error:

collation inconsistencies for two cross-library tables

Workaround: Add collate chinese_prc_ci_as after any column name that is faulted

For example:

Use DBA;
INSERT into Subjectdb. Prodefine.projectinfo
(Code,
Projectcitycode,
Cnname,
Creator,
Createtime,
Validstatus,
Sortno,
Versionno,
Versionstarttime
)
SELECT NEWID (),
City. Code,
INS. Project name,
' BDD ',
GETDATE (),
' 1 ',
' 1 ',
' 1 ',
GETDATE ()
From Bdd_projectinfo_shiyan_insert INS
INNER JOIN SUBJECTDB.Common.City cities on INS. Project City COLLATE chinese_prc_ci_as =city. Cnname
WHERE INS. Project name COLLATE chinese_prc_ci_as not in (SELECT cnname
From Subjectdb. Prodefine.projectinfo
 )

Cannot resolve the collation conflict between "Chinese_prc_ci_as" and "sql_l and cause the query result to be empty because of different collation

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.