Sorting rules for SQL Server databases

Source: Internet
Author: User

1) if the default sorting rules of the database are not related to Chinese characters, the database may not accept any Chinese characters, and the input and output are directly garbled.
Change the location of the default sorting rule: Database attribute --- option ---- sorting rule.

(2) If the two tables have different sorting rules, the following errors may occur when the two tables are connected:
The sorting rule conflict between "SQL _latin1_general_cp1_ci_as" and "chinese_prc_ci_ai" cannot be solved in equal to operation.

Solution:
& Lt; 2.1 & gt;

Select a. * From process_result_temp
Left Join process4prs B on A. projid = B. projid collate SQL _latin1_general_cp1_ci_as
And a. process_id = B. process_id collate SQL _latin1_general_cp1_ci_as
Where B. process_type = 'M'

 

If an error persists, you can specify collate database_default.

& Lt; 2.2 & gt;

Directly modify the table sorting rules. open the design view of the table and select a string field. The sorting rule is found below and can be directly modified. in fact, you only need to modify the foreign key without changing each column.

 

========Check the sorting of fields.

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.