admin 管理员组文章数量: 1086019
I am trying to import CSV file in PostgreSQL, but every time I run the query it gives me could not open file "D:\employee_data.csv" for reading: No such file or directory
. What possibly could be the reason for such error?
I am using pgadmin4 tool in Windows to connect the database which is also in a Windows environment.
This is the query:
COPY
employee(employee_id, first_name, last_name, department, salary, joining_date, age)
FROM'D:\employee_data.csv'
DELIMITER','
CSV HEADER;
While running this query I get this error:
ERROR: could not open file "D:\employee_data.csv" for reading: No such file or directory
HINT: COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.
SQL state: 58P01
本文标签: databaseHow to Import correctly CSV file using pgAdmin4 in postgreSQLStack Overflow
版权声明:本文标题:database - How to Import correctly CSV file using pgAdmin4 in postgreSQL? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/p/1744082821a2530570.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论