SQL Error [42601]: ERROR: syntax error at the filepath while importing csv file in postgresql

Viewed 13

I have created an table and then I'm trying to import a csv file from my local machine. I wrote on the console in the following way.

copy schema_name.newtble (col_1, col_2, col_3, ID) FROM ‘D:\directory\subderictory\filename.csv’ DELIMITER ‘,’ CSV HEADER;

But I got the error

SQL Error [42601]: ERROR: syntax error at or near "‘D"

Please help me to solve it out. It seems like I have done some silly mistake.

0 Answers
Related