Re: Import csv

Поиск
Список
Период
Сортировка
От terry@greatgulfhomes.com
Тема Re: Import csv
Дата
Msg-id 000801c234cc$69fdab00$2766f30a@development.greatgulfhomes.com
обсуждение исходный текст
Ответ на Import csv  (Patrick Nelson <pnelson@neatech.com>)
Список pgsql-general
devtest2=# \h copy
Command:     COPY
Description: copy data between files and tables
Syntax:
COPY [ BINARY ] table [ WITH OIDS ]
    FROM { 'filename' | stdin }
    [ [USING] DELIMITERS 'delimiter' ]
    [ WITH NULL AS 'null string' ]
COPY [ BINARY ] table [ WITH OIDS ]
    TO { 'filename' | stdout }
    [ [USING] DELIMITERS 'delimiter' ]
    [ WITH NULL AS 'null string' ]

Hence

COPY t1 FROM '<filename>' USING DELIMITERS ',';

Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes
terry@greatgulfhomes.com

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Patrick Nelson
> Sent: Friday, July 26, 2002 1:45 PM
> To: PostgreSQL List (E-mail)
> Subject: [GENERAL] Import csv
>
>
> I'm away from my PostgreSQL book (me SQL bible) and I'm faced
> with importing
> csv (comma separated vales) file where I had setup all my
> scripts to tsv
> (tab separated vales).  Yes I can use an editor, as such and
> change the
> commas, but that's not the question.
>
> How do I take a basic csv file and insert it into my table (named
> dwnldstockanal)?  Just feel that this is something that I
> should know, but
> me scratches me head.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to
> majordomo@postgresql.org)
>

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

Предыдущее
От: Patrick Nelson
Дата:
Сообщение: Import csv
Следующее
От: "Roderick A. Anderson"
Дата:
Сообщение: Re: Advice on geolocation