Get the App
SLTechnology News&Howtos  ›  Database  › 

Sybase bcp Unexpected EOF enco

Shulou Source: shulou.com Published: 2022-06-01 22:37:09 10月02日 Update

Today, when testing the batch import data of bcp, there will be errors in err.txt after each data import. The error content is as follows:

Unexpected EOF encountered in BCP data-file.

Bcp copy in partially failed

Enter the contents of bcp.sql as follows:

Bc | | 1 | | 2010-07-27 1414 4000 &

Bc | | 1 | | 2010-07-27 1414 4000 &

Bc | | 1 | | 2010-07-27 1414 4000 &

Bc | | 1 | | 2010-07-27 1414 4000 &

Bc | | 1 | | 2010-07-27 1414 4000 &

Bc | | 1 | | 2010-07-27 1414 4000 &

Bc | | 1 | | 2010-07-27 1414 4000 &

Bc | | 1 | | 2010-07-27 1414 4000 &

The bcp command is as follows

Bcp tt in. / bcp.sql-Unms-Penetmanager-SSYBASE-c-t'| |'- ringing roommates'- b10 >. / err.txt 2 > & 1

The line Terminator is set to & &, which still reports that error after testing for a long time. After tossing about for a long time, I remembered that there was an invisible newline character at the end of each line, and the command was changed to

Bcp tt in. / bcp.sql-Unms-Penetmanager-SSYBASE-c-t'| |'- ringing rooms &\ n'- b10 >. / err.txt 2 > & 1

The problem has been solved. Sure enough, it was caused by an invisible return.

Tags: Error content command data test newline Terminator result problem Tiandu Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux Apple Microsoft Shulou Information