Re: COPY: how to use "," as a delimeter? - Mailing list pgsql-general

From frbn
Subject Re: COPY: how to use "," as a delimeter?
Date
Msg-id 3D50DA8D.5070903@efbs-seafrigo.fr
Whole thread Raw
In response to COPY: how to use "," as a delimeter?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List 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/






pgsql-general by date:

Previous
From: Jean-Christian Imbeault
Date:
Subject: COPY: how to use "," as a delimeter?
Next
From: Richard Huxton
Date:
Subject: Re: design question - newbie