Need help with COPY

From: Jonathan Hseu <vomjom(at)vomjom(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Need help with COPY
Date: 2001-06-16 07:57:42
Message-ID: 20010616025742.A23010@vomjom
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to import a table from a file. The format of the table in the file is as
such:
"FName","LName","Address","City"

The format of the table is:
(FName varchar(80), LName varchar(80), Address varchar(80), City varchar(80))

I want to do a:
COPY table FROM 'filename' USING DELIMITERS ','

The problem is, it also imports the quotes. Also, there are sometimes commas in
the address, and it takes those as delimiters. Is there any way to make it take
only the stuff within the quotes and ignore any delimiters within them?

Jonathan Hseu

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Wun 2001-06-16 08:53:40 problem with 010.pgsql.sh start
Previous Message Richard Huxton 2001-06-16 07:12:21 Re: Insert and limit