Solved

BCP load from text file.

Posted on 1998-04-23
3
434 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

636 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