dbTalk Databases Forums  

bcp import from ascii data with line feed in fields

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss bcp import from ascii data with line feed in fields in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dirk Pass
 
Posts: n/a

Default bcp import from ascii data with line feed in fields - 11-10-2003 , 01:30 AM






Hello,
I'd like to import from an ascii text file where the fields are delimited by
semicolon (strings and texts are further enclosed in quotes) and rows by
carriage return. However, some text fields contain line feeds themself. I've
already tried to create a .fmt file to be used with bcp, but it still fails:

Starting copy...
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unexpected EOF encountered in BCP
data-file

Is it possible, that bcp mistakenly first tries to parse the entire row
before it breaks it down to fields by using the delimiters?!
What can I do to achieve a proper import?


Thank you,


Dirk



Reply With Quote
  #2  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: bcp import from ascii data with line feed in fields - 11-10-2003 , 07:12 AM






You have to use delimiters that are not found in the fields. They can be as
odd as µ.

Ilya

"Dirk Pass" <newsgroup-news (AT) dirk-pass (DOT) com> wrote

Quote:
Hello,
I'd like to import from an ascii text file where the fields are delimited
by
semicolon (strings and texts are further enclosed in quotes) and rows by
carriage return. However, some text fields contain line feeds themself.
I've
already tried to create a .fmt file to be used with bcp, but it still
fails:

Starting copy...
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unexpected EOF encountered in
BCP
data-file

Is it possible, that bcp mistakenly first tries to parse the entire row
before it breaks it down to fields by using the delimiters?!
What can I do to achieve a proper import?


Thank you,


Dirk





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.