admin管理员组文章数量:1336401
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 \
本文标签: pgadmin 4SQL state 42601 Error in PostgreSQL when creating a tableStack Overflow
版权声明:本文标题:pgadmin 4 - SQL state: 42601 Error in PostgreSQL when creating a table - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742404896a2468620.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
\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