I want to import data from *.csv file to view in the PostgreSQL with 9.3 version. Here is the following script I have tried.
Example:
\copy "viewName" from 'D:\filename.csv' DELIMITER ';' CSV HEADER;
Error
ERROR: cannot copy to view "viewName"
Questions:
Where I am going wrong?
Or I need to copy it into table then select it from there?
COPY aTable FROM D:\filename.csv' DELIMITER ';' CSV HEADER;
and thenCREATE OR REPLACE VIEW viewName AS (SELECT * FROM aTable )
– wingedpanther Aug 7 '14 at 11:43