I need some help with this problem it's driving me crazy. I have a Bulk Insert statement which uses a format file. Everything works fine except the application I'm exporting from creates a eof marker at the end of the text file. This causes the Bulk Insert in SQL Server to fail with an unexpected end-of-file. I know it's the eof marker because if I remove it everthing works fine. I cannot edit the file every time and remove the eof marker because I need to execute this statement several hundred times. It may not necessarily be an eof marker it may just be a blank line but it shows up in notepad like an eof marker/black square. Does anybody know of a way for SQL BULK INSERT to deal with this?