简体   繁体   中英

Import csv to postgresql: Missing data for the column

I try to import data from csv to my database postgresql, i use COPY but i have this error message:

ERROR: Missing data for the column « inventaire »

this is my instruction:

COPY calcul FROM 'C:/vente.csv' DELIMITER ',' CSV;

Do not get it wrong because

COPY is used for SQL

while

\\copy is used for psql

ie

\copy calcul FROM 'C:/vente.csv' (FORMAT csv, HEADER, DELIMITER ',');

I hope this helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM