May 7, 2002 at 9:22 am
Hi.
I have a number og text files that I am bulkInserting into the db. THese files are generated by an external system which I have no control over. These text files have an inconsistant number (7-8) of Carriage returns appended at the end of the data.
When I run the Transact BulkInsert statement, I get the ff error;"[Microsoft][ODBC SQL Server Driver][SQL Server]Bulk Insert: Unexpected end-of-file (EOF) encountered in data file.
". If I delete these Carriage returns , the statement succeeds.
How can I programmatically remove these Carriage returns ? However I don't want to use 1. DTS, 2. To read the text files line by line and test for each line if it is blank, until AtEndOfStream is true. This method is too slow (Time is critical for me here)
I'd appreciate help in this matter.
May 7, 2002 at 10:45 am
Please do not cross post. Duplicate message please post/see response in http://www.sqlservercentral.com/forum/topic.asp?TOPIC_ID=4089&FORUM_ID=19&CAT_ID=3&Topic_Title=BulkInsert+problem&Forum_Title=Data+Transformation+Services+%28DTS%29
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply