X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id CCD11D1B452 for ; Fri, 9 Jan 2004 20:05:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 67983-09 for ; Fri, 9 Jan 2004 16:04:53 -0400 (AST) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr1.postgresql.org (Postfix) with ESMTP id CCF5AD1B43F for ; Fri, 9 Jan 2004 16:04:51 -0400 (AST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 1Af2sF-0008I2-0Y; Fri, 09 Jan 2004 20:04:51 +0000 Received: by mainbox.archonet.com (Postfix, from userid 529) id 06BC716EED; Fri, 9 Jan 2004 20:04:50 +0000 (GMT) Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 4C9FD16EEA; Fri, 9 Jan 2004 20:04:49 +0000 (GMT) From: Richard Huxton To: azwa@nc.com.my, pgsql-sql@postgresql.org Subject: Re: data loading Date: Fri, 9 Jan 2004 20:04:48 +0000 User-Agent: KMail/1.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401092004.48865.dev@archonet.com> X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.15.3 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/73 X-Sequence-Number: 16466 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