Re: Problem importing a csv file - Mailing list pgsql-general

From planas
Subject Re: Problem importing a csv file
Date
Msg-id 1314580895.4549.11.camel@planas-pingy-1104
Whole thread Raw
In response to Re: Problem importing a csv file  (pasman pasmański <pasman.p@gmail.com>)
Responses Re: Problem importing a csv file
List pgsql-general
On Sun, 2011-08-28 at 03:53 -0200, pasman pasmański wrote:
What if you run this query using psql?

-- 
------------
pasman


When I run the following:

DROP Table "ContactUpdates"

CREATE TABLE "ContactUpdates"
(
  "VendorID" integer NOT NULL,
  "LastName" character varying(45),
  "FirstName" character varying(45),
  CONSTRAINT "ContactUpdates_pkey" PRIMARY KEY ("VendorID" )
)
WITH (
  OIDS=FALSE
);
ALTER TABLE "ContactUpdates"
  OWNER TO postgres;

The table is created with proper columns

Then running

COPY CountUpdates
FROM '/media/Fred/Work/SQL_Server/AP/ContactUpdates.csv'
DELIMITER ',' CSV

gives this error message

ERROR:  relation "countupdates" does not exist


********** Error **********

ERROR: relation "countupdates" does not exist
SQL state: 42P01
Adding ""
COPY "CountUpdates"
FROM '/media/Fred/Work/SQL_Server/AP/ContactUpdates.csv'
DELIMITER ',' CSV

ERROR:  relation "CountUpdates" does not exist


********** Error **********

ERROR: relation "CountUpdates" does not exist
SQL state: 42P01

But the file exists, it was previously created. What is the problem?
--
Jay Lozier
jslozier@gmail.com

pgsql-general by date:

Previous
From: planas
Date:
Subject: Re: Problem importing a csv file
Next
From: Shoaib Mir
Date:
Subject: Re: Problem importing a csv file