July 7, 2006 at 4:19 am
I have quite a few large csv files that I'm trying to upload using bcp. These files are well structured, and I have used bcp to generate a format file for uploading them.
My problem is, the string fields in my csv file are quoted eg: "qwert", so, when the field is defined as 5 chars long, bcp loads it as "qwer - and so the rest of the record gets out of sync.
I dont want to load it as 7 characters and then strip out the quotes because we are talking quite a few million rows here, and I'm a bit short of time.
Any suggestions? Thanks.
July 7, 2006 at 6:32 am
Modify your format file so that the field delimiters includes the quote character, like "," instead of just ,
Hope this helps
Mark
March 24, 2015 at 1:41 pm
In order to use "," as a delimiter in my format file on a Unix system, I had to enter it like this: "\",\""
In other words I had to "escape" the inner quotes so the format file syntax didn't think it was part of the format file's normal double quotes that surround the delimiter.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy