Answered step by step
Verified Expert Solution
Link Copied!

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

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions