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

1. We created a csv file names my_file.csv with the following information:
FIRSTNAME,LASTNAME,STREET,CITY,STATE,PHONE
John,Doe,123 Main st.,Hyde Park,NY,845-555-1212
2. We ran this script:
create table city_demo
copy city_demo
FROM 'C:\Users\Public\scripts\my_file.csv'
WITH (FORMAT CSV, HEADER);
3. We received this error:
ERROR: extra data after last expected column
CONTEXT: COPY city_demo, line 2: "John, Doe, 123Mainst, HydePark, NY"
SQL state: 22P04
----------------------------------------------
What do you think went wrong??

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!