BULK INSERT tab-delimited file – With commas in Description

Good Morning

I am trying to import a CSV file With the BULK INSERT Function. I am doing it through SQL because it can be an automated process. The proble I picked up is that the CSV file I get from the client has commas in the Item Description i.e Rosetta 10,5x25x4 – When I try to import it that comma in the description causes a problem: Here is the Script I am running:

 BULK INSERT ORDERS_DATA
FROM 'C:back_orders_2013.csv'
WITH
(
    FIRSTROW = 2,
    FIELDTERMINATOR = ',',  
    ROWTERMINATOR = 'n',  
    TABLOCK
)

Is there a way to ignore that like in excel where you treat consecutive delimiters as one?

Thanks


Source: sql

Leave a Reply