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

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>
Subject: Re: COPY: how to use "," as a delimeter?
Date: 2002-08-07 08:30:05
Message-ID: 3D50DA8D.5070903@efbs-seafrigo.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Henrik Steffen 2002-08-07 09:51:01 Re: COPY: how to use "," as a delimeter?
Previous Message Richard Huxton 2002-08-07 08:24:11 Re: design question - newbie