Bulk Insert - Strip chars from some fields

  • I am using bulk insert to bring data from .csv files. Some of the columns in the .csv files have the text delimited by quotes, as well as a comma. I am looking for a way to strip the quotes from these fields on the bulk insert.

  • This was removed by the editor as SPAM

  • BULK Insert does not allow you to manipulate the as it goes in,

    though there is a way using a Format File.

    I ran into this issue; Need the performance of the Bulk Insert, but yet needed to tweak the cols coming in. Someone mentioned using a File Format.

    Other than that tweak the file before Bulk Inserting or use DTS where you can write an Active X script to cleanse the data as it is going in.

    What are the size of these files?

  • I found some documentation that said that bulk insert doesn't have the ability to modify the data as it's being 'inserted'. So, I've written a stored procedure to run against each table which strips out the quotes. It works, but it's time consuming to set up. However, since I will be using the bulk insert at least 60 times for each .csv file, it's worth it. Thanks for your response.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply