0
create table covid19(
  FIPS varchar(6),
  Admin2 VARCHAR(41),
  Province_State VARCHAR(40),
  Country_Region VARCHAR(32),
  Last_Update VARCHAR(19),
  Lat VARCHAR(19),
  Long_ varchar(19),
  Confirmed integer,
  Deaths integer,
  Recovered varchar(10),
  Active varchar(10),
  Combined_Key VARCHAR(42),
  Incident_Rate float,
  Case_Fatality_Ratio float
);
copy covid19
from 'C:\Users\ryan\Downloads\10.12.2022.csv'
delimiter ','
csv header;

I have two questions.

  1. First is the path of .csv file. I copy the path directly like this 'C:\Users\ryan\Downloads\10.12.2022.csv'.But the error is that could not open file "C:\Users\ryan\Downloads\10.12.2022.csv" for reading: No such file or directory. How should I do?
  2. There is another error that syntax error at or near "csv" . I guess the mistake is 'header'. How to correct header?

I think the header is the first row of my .csv file. I really don't know how to correct it.

簡宥文
  • 1
  • 1

0 Answers0