Solved

BCP load from text file.

Posted on 1998-04-23
3
425 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now