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

From: "Henrik Steffen" <steffen(at)city-map(dot)de>
To: "frbn" <frbn(at)efbs-seafrigo(dot)fr>
Cc: "pg" <pgsql-general(at)postgresql(dot)org>
Subject: Re: COPY: how to use "," as a delimeter?
Date: 2002-08-07 09:51:01
Message-ID: 029801c23df7$f02ea380$7100a8c0@topconcepts.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)topconcepts(dot)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(at)efbs-seafrigo(dot)fr>
To: "Jean-Christian Imbeault" <jc(at)mega-bucks(dot)co(dot)jp>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)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(at)postgresql(dot)org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Elielson Fontanezi 2002-08-07 11:32:54 J2EE IDE - to help J2EE development
Previous Message frbn 2002-08-07 08:30:05 Re: COPY: how to use "," as a delimeter?