Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BCP - Unexpected EOF Error

544 views
Skip to first unread message

Gayathri

unread,
Dec 12, 2006, 12:16:07 AM12/12/06
to
I am using below format file
10.0
4
1 SYBCHAR 0 6 "|" 1 COMPLEX_ID
2 SYBCHAR 0 9 "|" 2 DRIVER_ID
3 SYBCHAR 0 30 "|" 3 DRIVER_NAME
4 SYBCHAR 0 1 "\n" 4 STATUS

The input file is
339000|123456789|123456789012345678901234567899|
339000| 21| TEST|I
339000| 22| |A
339000|121212121|123456789012345678901234567890|B

When i run the BCP command its showing below error.But the
rows are copied in the DB.

Starting copy...
Unexpected EOF encountered in BCP data-file.
bcp copy in partially failed

4 rows copied.

Mark A. Parsons

unread,
Dec 12, 2006, 7:36:35 AM12/12/06
to
If you're running in UNIX, consider using the 'od' command to verify the contents of your file against your format definition, eg:

od -c <file_name>

What you're looking for is confirmation that each line ends with a "\n", especially the last line.

The fact that all data is getting copied in before you get the error sounds like you may not have a "\n" at the end of the last line ... 'od -c' should be able to verify this.

0 new messages