Edited: I was trying to create a table within PostgreSql server but got an error.
ERROR: syntax error at or near "\"
LINE 40: \COPY public.fy24pcard
^
SQL state: 42601
Character: 812
and the query looks like this:
\COPY public.fy24pcard
FROM 'C:\Users\Omitted.csv'
WITH DELIMITER ',' CSV HEADER
Can someone help me with this?
I tried importing the file using IMPORT but failed.
Edited: I was trying to create a table within PostgreSql server but got an error.
ERROR: syntax error at or near "\"
LINE 40: \COPY public.fy24pcard
^
SQL state: 42601
Character: 812
and the query looks like this:
\COPY public.fy24pcard
FROM 'C:\Users\Omitted.csv'
WITH DELIMITER ',' CSV HEADER
Can someone help me with this?
I tried importing the file using IMPORT but failed.
Share edited Nov 19, 2024 at 20:38 fishli asked Nov 19, 2024 at 18:53 fishlifishli 111 silver badge3 bronze badges 2 |1 Answer
Reset to default 1\COPY is a command for the psql client, not for pgadmin. Remove the \
\copy
is a psql command. So either usepsql
or the pgAdmin4 GUI for COPY as shown here Import/Export data. – Adrian Klaver Commented Nov 19, 2024 at 19:09IMPORT
. 2) What failed and what where the error messages? – Adrian Klaver Commented Nov 19, 2024 at 21:36