Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started