Re: Problems importing csv files

Поиск
Список
Период
Сортировка
От Kindra Martinenko
Тема Re: Problems importing csv files
Дата
Msg-id 448995.80419.qm@web30207.mail.mud.yahoo.com
обсуждение исходный текст
Ответ на Problems importing csv files  (Kindra Martinenko <kindramart@yahoo.com>)
Ответы Re: Problems importing csv files  (Robert Schnabel <schnabelr@missouri.edu>)
Список pgsql-novice
Thanks Robert  & Tim, this was very helpful, however

I tried:

COPY BaxterCommercial 
FROM E'H:\\transpor\\Traffic Counts\\TMS\\MarApr09\\BaxterCommercial.csv'
WITH CSV;

And it returned with this error:


ERROR:  relation "baxtercommercial" does not exist

Any ideas?

Thanks,

Kindra

From: Robert Schnabel <schnabelr@missouri.edu>
To: Kindra Martinenko <kindramart@yahoo.com>
Cc: pgsql-novice@postgresql.org
Sent: Monday, June 22, 2009 1:15:57 PM
Subject: Re: [NOVICE] Problems importing csv files


Kindra Martinenko wrote:
Hello,

I am having problems importing csv files into postgresql. I am hoping someone has had a similar problem and could help me troubleshoot.

I created a table that mimics the csv table I want to read from.  I set privleges to "All" and have been attempting to execute the following procedure:

COPY BaxterCommercial WITH OIDS FROM 'H:\...\BaxterCommercial.csv'
USING DELIMITERS ',';

You need to escape the \ and maybe use the absolute path.
http://www.postgresql.org/docs/8.3/interactive/sql-copy.html

If you're using Windows try this but put the full path name instead of ...  I use this frequently to load large files.
COPY BaxterCommercial WITH OIDS FROM E'H:\\...\\BaxterCommercial.csv'
WITH CSV;

Bob

В списке pgsql-novice по дате отправления:

Предыдущее
От: Robert Schnabel
Дата:
Сообщение: Re: Problems importing csv files
Следующее
От: Robert Schnabel
Дата:
Сообщение: Re: Problems importing csv files