Search Postgresql Archives

Re: Problem importing a csv file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux