Resolve Sqlsever 2014 Replication results to Excel multi-trip problem

Source: Internet
Author: User

Query data 08 and 14 The results are the same, SQL Sever 2018 copy to Excel no problem, but 14 version is not necessarily correct, check the reason is the 14 version will return "carriage return" and "line break", so the fields found here to remove the line and carriage return:

Replace (replace (A.fmodel,char (), '), char (13), ')

About the difference between the carriage return line, here post Baidu difference:

Chr (13) and Chr (10) all have the same effect under the win system,
In a Linux system, a valid newline can only be for Chr (10), i.e./n
For uniform format and compatibility, all text line-wrapping rates are based on a combination of \ r \ +CHR (10) to determine

There is another kind of difference between the two symbols in the win system, I did not go to verify whether 100% is correct, you can take the reference
"\ chr (10) wraps and the cursor position is unchanged on the new line
\ r ie Chr (13) Enter, move the cursor to the beginning of the line

Resolve Sqlsever 2014 Replication results to Excel multi-trip problem

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.