New to PostgreSQL. I have a .csv that I want to import into PostgreSQL with the COPY command as follows:
COPY zzz_dataset
FROM 'C:Usersmy_nameDesktopSQLzzz_deliveryzzz_dataset.csv'
CSV HEADER;
The error that yielded was:
ERROR: relation "zzz_dataset" does not exist
SQL state: 42P01
I have also attempted the following with the same results:
- Remove the indentation in Line 2 and 3
- Added “” and ” in zzz_dataset
- Added DELIMITER ‘,’ in Line 3 instead
- Used the Import Data wizard with UTF8 encoding, with Header turned on but it produced the following error:
ERROR: extra data after last expected column
CONTEXT: COPY zzz, line 2:
I am really quite clueless here, and I have tried looking at other similar threads. Would appreciate any help given, thanks!