Re: COPY command

From: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>
To: <azwa(at)nc(dot)com(dot)my>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: COPY command
Date: 2004-01-09 03:06:27
Message-ID: 71E37EF6B7DCC1499CEA0316A256832801057589@loki.wc.globexplorer.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

This sounds as if the last character in each line might be a delimiter (a ",") which is standard for data unloaded from some sources; if this is the case try removing it and your data should load. Or you may have a comma in a character field and that is throwing off the count for the line in question ?

HTH,

Greg Williamson
DBA
GlobeXplorer LLC

-----Original Message-----
From: azwa(at)nc(dot)com(dot)my [mailto:azwa(at)nc(dot)com(dot)my]
Sent: Tue 1/6/2004 10:19 PM
To: pgsql-sql(at)postgresql(dot)org
Cc:
Subject: [SQL] COPY command

Hi,

i try to load a file into temporary table but it gives me an error . do
u have any idea/solutions ?? the command that i've running 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

FYI, my file was in comma delimiter type (csv) . My table structure as
following :

dwnc-# \dbiosadm.custdo_temp
Table "biosadm.custdo_temp"
Column | Type | Modifiers
----------+-----------------------+-----------
dono | character varying(13) |
dodate | date |
custname | character varying(70) |
custlo | character varying(40) |
attnto | character varying(80) |

Please guide me . thanks

Browse pgsql-sql by date

  From Date Subject
Next Message azwa 2004-01-09 04:11:29 Re: COPY command
Previous Message azwa 2004-01-09 02:13:09 data loading