From: Richard Huxton <dev@archonet.com>
To: azwa@nc.com.my
To: pgsql-sql@postgresql.org
Subject: Re: data loading
Date: Fri, 9 Jan 2004 20:04:48 +0000
Message-ID: <200401092004.48865.dev@archonet.com> (raw)
In-Reply-To: <OF9676234F.055C727D-ONFFFFFF44.00279362@nc.com.my>
References: <OF9676234F.055C727D-ONFFFFFF44.00279362@nc.com.my>
On Friday 09 January 2004 02:13, azwa@nc.com.my wrote:
> Hi,
>
>
> i try to load data from flat file (comma delimiter format) into
> temporary table . i use COPY command as below:
>
> dwnc=# copy biosadm.custdo_temp
> dwnc-# from '/home/bios/customer_data/CustomerDO_new.CSV'
> dwnc-# WITH DELIMITER ',' ;
>
> ERROR: copy: line 141, Extra data after last expected column
Does line 141 (or nearby) have a comma somewhere in its data? That would fool
the COPY into mis-counting the columns. See the COPY entry in the SQL Command
Reference chapter of the manuals - you'll want to escape any commas with a
backslash:
\,
--
Richard Huxton
Archonet Ltd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, azwa@nc.com.my
Subject: Re: data loading
In-Reply-To: <200401092004.48865.dev@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox