Workarounds for truncation errors in importing Excel files into Sqlserver2008

Source: Internet
Author: User

Possible causes of errors:

1, database field varchar length is not enough;

2, cannot use the text type;

3. There may be line breaks in the data;

4, the data item text is too long, more than 4000;

5, the maximum length of the first 8 lines is not large enough, behind the more than.

Workaround:

1, modified varchar length is long enough;

2, replace the swap line character (you can manually enter a line break, copied into the replacement text box, office can hold the ALT key, small keyboard input 10, and then release the ALT key);

3, the first row of records set long enough, after import and replace;

4, save Excel file As 2007 format, can solve the problem that many data items are null after importing;

5, ignore when setting truncation error on import, can resolve some problems that can't be imported by some super long records.

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.