Why can't I BCP a Unix file into SQL Server? I get UNEXPECTED EOF messages.

Neil Pike

March 4, 1999

1 Min Read
ITPro Today logo

A. This is because UNIX files use just a linefeed (LF, 0x0A) as arecord terminator. NT used a carriage return plus linefeed (CR+LF, 0x0D0A). TheBCP N character resolves to CR+LF.

You have to reformat the file using a tool like AWK/SED/PERL to convert thereformat the 0x0D character to 0x0D0A

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like