Unexpected end of file encountered in bcp
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 4 years, 7 months ago. Active 2 years, 7 months ago. Viewed 17k times. Improve this question. Jeremy Holovacs Jeremy Holovacs 1, 3 3 gold badges 16 16 silver badges 24 24 bronze badges.
I would start by verifying the integrity of the file - for instance loading it into Excel and checking that all rows have the same number of tab characters.
Do you need to escape any tab characters? Or -w for unicode characters I assume you checked that but thought it's worth mentioning — Jacob H. TIA, John. Yup, Common problem, I have done lots of work with Bcp and it is tricky but does work if you set it up right.
Matthew Dodd Phoenix Solutions. Page 1 of 1. Active 1 year, 9 months ago. Viewed 27k times. File has only one line for now just sample data I check it many times its one line Data looks like this ,Vasya,Pupkin,,,P. Box 52,,Wrna,, ,SR,4,0,W,1,,,3,,month,0,0,1,0,1,45,,, Any ideas how to fix this problem? CuberChase 4, 5 5 gold badges 32 32 silver badges 51 51 bronze badges.
Andrey Andrey 1, 12 12 gold badges 32 32 silver badges 60 60 bronze badges. Avoid using these data types in new development work, and plan to modify applications that currently use them.
Use nvarchar max , varchar max , and varbinary max instead. Your table has 30 columns - the sample from the file you bulk load has 29 columns If you fix both those issues, what happens? Show 1 more comment. Please attach a sample. Notice that you have option to attach files to the messages here. To be picky, that is not a CSV file as it is tab-separated. Or at least you say so in the BCP command.
Since the file has a header, you need the option -F 2 to skip the header row. However, that is your not problem for the moment, because in that case you would have gotten a different error message.
A conversion error. It Tom Phillips's suggestion about line-endings does not help you, we need to see a sample the which demonstrates the problem.
0コメント