postgresql - ERROR: missing data for column when using \copy in psql -
I am trying to import a .txt file into PostgreSQL. There are 6 columns in the txt file:
lab_name lab_ID feature ZIP_Code city state and 213 rows.
I am trying to use \ copy to use this command in PostgreSQL in a table called doe2 . :
\ copy DOE2 FROM '/users/nathangroom/desktop/DOE_inventory5.txt' (DELIMITER ('')) This gives me this error
I have to do this while facing this error and some
Three possible reasons:
-
One or more rows of burnt file only 4 or less space characters (your delimiters).
-
One or more space characters have survived (inadvertently) possibly with a backslash at the end of an unconditional value. Using the
textformat (default) you can cite theCOPY/ code> data characters For data which can otherwise be taken as line or column delimiter.Nobody will perform but will your file be edited or is it from a different, faulty source?
- You are not using the file you looks you are using
\ copyMeta The command's psql command line interface is a wrapper forCOPYand reads the file locally on the client . If your file stays on the server, then use the SQL command instead.
- You are not using the file you looks you are using
Comments
Post a Comment