Thread: copy from csv

copy from csv

From
"Scott Porter"
Date:

I am copying data from a CSV file using the query noted below.   Many items in my CSV file contain the double quotes in the field (i.e., ‘20” COLOR MONITOR’).  This field imports as, ‘""20"" COLOR MONITOR""’.  How do I remove all those extra quotes?  Also, should I be using the STDIN parameter or is my query below sufficient?

 

COPY item_master

(id, description, unit_measure, mfg, product_line)

FROM 'c:/item_test1.csv'

using delimiters ','