Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BULK INSERT Failing Due to Unexpected End of File - Help!

Status
Not open for further replies.

faust13

Programmer
Aug 7, 2001
176
US
I'm trying to do a BULK INSERT from a file. Everytime I execute the SQL I get "Bulk Insert: Unexpected end-of-file (EOF) encountered in data file."

SQL:

BULK INSERT DB.Tbl
FROM 'c:\source.txt'
WITH
(
FIELDTERMINATOR = '|',
ROWTERMINATOR = '|^|',
KEEPNULLS
)

Source File Format:

data|data|Data|blah|^| ----------------------------------------
Is George Lucas Kidding...
 
Control-Z ascii value 26, is sometimes considered an end of file (eof) character. You might want to load your text file into an ascii editor and search for that character.
 
I had a space at the end of the file that was hosing the BULK INSERT.

Thanks! ----------------------------------------
Is George Lucas Kidding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top