0

I am having problems copying a csv into an SQL table that I have already made in pg admin 4 but when I try to use the Copy command to transfer the csv data into the table I keep getting an ERROR relation doesn't exist even though its being made on the same table

CREATE TABLE IF NOT EXISTS "Krizzha DC"."DCcreative"
(
    page_id integer NOT NULL,
    page_name "char",
    date_ date,
    likes integer,
    unlikes integer,
    impressions integer,
    reach integer,
    CONSTRAINT "DCcreative_pkey" PRIMARY KEY (page_id)
)
TABLESPACE pg_default;

ALTER TABLE IF EXISTS "Krizzha DC"."DCcreative"
    OWNER to postgres;
COPY DCcreative(page_id, page_name, date_, likes, unlikes, impressions, reach)
FROM 'C:\Users\Adrian Fortuno\Documents\PGADMIN\krizzhadc.csv'
DELIMITER ','
CSV HEADER;

ERROR: relation "krizzhadc" does not exist
SQL state: 42P01

0 Answers0