Re: using copy to insert data.

Поиск
Список
Период
Сортировка
От Andrew McMillan
Тема Re: using copy to insert data.
Дата
Msg-id 1044554651.2940.11.camel@kant.mcmillan.net.nz
обсуждение исходный текст
Ответ на using copy to insert data.  ("Jennifer Lee" <jlee@scri.sari.ac.uk>)
Список pgsql-novice
On Fri, 2003-02-07 at 05:40, Jennifer Lee wrote:
> I'm trying to insert data from a delimited file using the copy command
> (COPY table FROM 'filepath') this works fine, but I would like to insert
> data into specific columns. I've read that this is possible but haven't
> been able to find documentation on how to do it. I've been able to
> insert the data as I'd like in two steps. 1. copy into a temporary table, 2.
> insert using select columns from the temporary table. Is there a way to
> do this in one step?

COPY table (column1, column2, column3 ) FROM ....

According to the docs it works in 7.3 but I have never had cause to use
that syntax myself.

Regards,
                    Andrew.
--
---------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/         PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201     MOB: +64(21)635-694    OFFICE: +64(4)499-2267
           Survey for nothing with http://survey.net.nz/
---------------------------------------------------------------------


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

Предыдущее
От: Andrew McMillan
Дата:
Сообщение: Re: Html output
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: Favorite Linux Editor for PostgreSQL Scripts?