spake wrote
> Here is my psql command:
> COPY data FROM '/Developer/data_20140608.csv' DELIMITER ',' CSV HEADER;
>
> and here is the error I get:
> ERROR: invalid input syntax for type numeric: ""
> CONTEXT: COPY npi_data, line 2, column replacement_npi: ""
Numeric columns in CSV are not quoted. What you have here is a text field in
the file and a numeric field in the database. You must resolve the
mis-match. The easiest way is to define the table column as text. If you
ultimately need to convert the column into numeric then you should consider
the import table to be a staging table and after the copy is done you
migrate the copied in data to the production table while performing any data
transformations needed.
David J.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PGSQL-9-3-2-COPY-command-issues-tp5811940p5811948.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.