Trying to import data into Azure. Created a text file in Management Studio 2005. I have tried both a comma and tab delimited text file.
BCP IN -c -t, -r\\n -U -S
Open the CSV file in EXCEL and "save as" new CSV file
If the file is tab-delimited then the command line flag for the column separator should be -t\t
-t,
"Unexpected EOF" normally means means the column or row terminator is not what you expect That is, your command line arguments for these do match the file
Typical causes:
SSMS should have nothing to do with it: it's the format (expected vs actual) that matters
I think most of us prefer real-world examples than syntax hints, so here's what I did:
bcp LoadDB.dbo.test in C:\temp\test.txt -S 123.66.108.207 -U testuser -P testpass -c -r /r
My data was an extract from a Unix-based Oracle DB which was tab delimited and had an LF end of line character.
Because my data was tab delimited I did not specify a -t parameter, the bcp default is tab.
Because my row terminator was a LineFeed (LF) character, then I used -r /r
Because my data was all being loaded into char fields I used the -c parameter
Just an FYI that I encountered this same exact error and it turned out that my destination table contained one extra column than the DAT file!
I every case that I have encountered this error, it ends up being an issue where the number of columns in the table do not the match the number of columns delimited in the text file. The easy way to confirm this is to load the text file into excel and compare the column count to that of the table.