Skip site navigation (1) Skip section navigation (2)

COPY command syntax error

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pdxpug(at)postgresql(dot)org
Subject: COPY command syntax error
Date: 2011-02-02 19:19:44
Message-ID: alpine.LNX.2.00.1102021113280.4447@salmo.appl-ecosys.com (view raw or flat)
Thread:
Lists: pdxpug
   I'm trying to import data from a .csv file into an existing table. It
worked the first time I loaded data into this table.

   I'm invoking psql from the same directory as the import.csv file. The command I'm using,
and the results are:

jerrittwq=# copy monitor from
'/home/rshepard/projects/queenstake/permitwatch/water-quality-info/csv_versions/import.csv'
with delimiter as ':' csv;
ERROR:  could not open file
"/home/rshepard/projects/queenstake/permitwatch/water-quality-info/csv_versions/import.csv"
for reading: No such file or directory

   Doesn't matter how I specify the file's location (full path or cwd). Do I
also need to specify the text delimeters with quote as '''? (The command
line does not like my using double quotes to delimit the single quote.)

   What do I have syntactically wrong here?

Rich

Responses

pdxpug by date

Next:From: Darrell FuhrimanDate: 2011-02-02 19:23:15
Subject: Re: COPY command syntax error
Previous:From: gabrielleDate: 2011-01-21 03:25:53
Subject: Re: Misusing yet another mailing list

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group