Solved

BCP load from text file.

Posted on 1998-04-23
3
428 Views
Last Modified: 2008-02-01
When I attempt to load data from an ascii text file to
a predefined table I get the following error:
DB-LIBRARY error:
Unexpected EOF encountered in BCP data-file.
Could someone provide advice, specific instructions, or
point me to a good BCP reference guide from which I could
resolve this?  
book  
0
Comment
Question by:vd
  • 2
3 Comments
 
LVL 7

Expert Comment

by:spiridonov
ID: 1088878
Most likely the problem is in your format file. Try manualy inserting a 'dummy' record into your table and then bcp it OUT without format file parameter. It will prompt you for format information for each field. Use the delimiters you are using in your text file and save the information in a new format file. You can then use this format file to bcp IN. Don't forget , that the last field delimiter should be "\r\n" if your records are on separate lines.
0
 

Author Comment

by:vd
ID: 1088879
This is an excellent response! It works. Thanks
0
 
LVL 7

Accepted Solution

by:
spiridonov earned 100 total points
ID: 1088880
Don't forget to grade.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question