COPY: how to use "," as a delimeter?
COPY: how to use "," as a delimeter?
От:
Jean-Christian Imbeault <jc@mega-bucks.co.jp>
Дата:
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 ... Thanks, Jc
Re: COPY: how to use "," as a delimeter?
От:
frbn <frbn@efbs-seafrigo.fr>
Дата:
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/
Re: COPY: how to use "," as a delimeter?
От:
"Henrik Steffen" <steffen@city-map.de>
Дата:
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" To: "Jean-Christian Imbeault" Cc: "pgsql-general" 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