Re: COPY: how to use "," as a delimeter?

Поиск
Список
Период
Сортировка
От Henrik Steffen
Тема Re: COPY: how to use "," as a delimeter?
Дата
Msg-id 029801c23df7$f02ea380$7100a8c0@topconcepts.net
обсуждение исходный текст
Ответ на COPY: how to use "," as a delimeter?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список pgsql-general
or write a short perl-script to handle this format


Mit freundlichem Gruß

Henrik Steffen
Geschäftsführer

top concepts Internetmarketing GmbH
Am Steinkamp 7 - D-21684 Stade - Germany
--------------------------------------------------------
http://www.topconcepts.com          Tel. +49 4141 991230
mail: steffen@topconcepts.com       Fax. +49 4141 991233
--------------------------------------------------------
24h-Support Hotline:  +49 1908 34697 (EUR 1.86/Min,topc)
--------------------------------------------------------
Ihr SMS-Gateway: JETZT NEU unter: http://sms.city-map.de
System-Partner gesucht: http://www.franchise.city-map.de
--------------------------------------------------------
Handelsregister: AG Stade HRB 5811 - UstId: DE 213645563
--------------------------------------------------------

----- Original Message -----
From: "frbn" <frbn@efbs-seafrigo.fr>
To: "Jean-Christian Imbeault" <jc@mega-bucks.co.jp>
Cc: "pgsql-general" <pgsql-general@postgresql.org>
Sent: Wednesday, August 07, 2002 10:30 AM
Subject: Re: [GENERAL] COPY: how to use "," as a delimeter?


Jean-Christian Imbeault a écrit:
> I have a CSV file that I would like ti import into pgsql. Unfortunately
> the data has been exported in the following format:
>
> "filed1","filed2","field3"
>
> furthemore the data also contains the odd " (quote) and in the CSV file
> it has been turned into "".
>
> How can I import this data? I have tried COPY but can't find the right
> delimeter to use ...


In the last resort, sed is your friend

http://linux.ctyme.com/man/man2377.htm

http://unxutils.sourceforge.net/






---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: design question - newbie
Следующее
От: Elielson Fontanezi
Дата:
Сообщение: J2EE IDE - to help J2EE development