Question: 1 . We created a csv file names my _ file.csv with the following information: FIRSTNAME,LASTNAME,STREET,CITY,STATE,PHONE John,Doe, 1 2 3 Main st . , Hyde
We created a csv file names myfile.csv with the following information:
FIRSTNAME,LASTNAME,STREET,CITY,STATE,PHONE
John,Doe, Main stHyde Park,NY
We ran this script:
create table citydemo
copy citydemo
FROM C:UsersPublicscriptsmyfile.csv
WITH FORMAT CSV HEADER;
We received this error:
ERROR: extra data after last expected column
CONTEXT: COPY citydemo, line : "John, Doe, Mainst, HydePark, NY
SQL state: P
What do you think went wrong??
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
