May 1, 2008 at 12:30 pm
I am trying to import a text file with a 2 line header using Bulk Insert and/or bcp. I can't seem to get the first row of data to import.
If I delete the 2 row header using notepad, I get all the data rows.
Can you help?
May 1, 2008 at 7:52 pm
Actually... no... not using Bulk Insert or BCP... they both require the headers to have the same number of delimiters as the "body" of the file even when you tell it to skip lines. It's the worst oversight the makers of BCP ever came up with.
One way to get around it is to make a little VB Script that copies all but the header line(s) to another file and then import that other file.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply