Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6541A9FBA46 for ; Mon, 14 May 2007 09:18:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 34674-05 for ; Mon, 14 May 2007 09:18:29 -0300 (ADT) X-Greylist: delayed 00:17:07.367101 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A00289FBA9E for ; Mon, 14 May 2007 09:18:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from wip-ectls-mx1.wipro.com (wip-ectls-mx1.wipro.com [203.91.193.21]) by svr4.postgresql.org (Postfix) with ESMTP id 0C8B35AF894 for ; Mon, 14 May 2007 12:01:11 +0000 (GMT) Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 8578B2203AC for ; Mon, 14 May 2007 17:31:19 +0530 (IST) Received: from blr-ec-bh01.wipro.com (blr-ec-bh01.wipro.com [10.201.50.91]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id 7821622021D for ; Mon, 14 May 2007 17:31:19 +0530 (IST) Received: from BLR-EC-MBX04.wipro.com ([10.201.50.168]) by blr-ec-bh01.wipro.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 14 May 2007 17:31:00 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7961F.89E076CC" Subject: ignoring primary key violations in COPY command Date: Mon, 14 May 2007 17:27:23 +0530 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ignoring primary key violations in COPY command thread-index: AceWHwiBeoj1vJbZR9+VqmKyv7UPDA== From: To: X-OriginalArrivalTime: 14 May 2007 12:01:00.0634 (UTC) FILETIME=[89F9A3A0:01C7961F] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/141 X-Sequence-Number: 28421 This is a multi-part message in MIME format. ------_=_NextPart_001_01C7961F.89E076CC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all,=20 We are importing the data from the CSV file into the database using COPY command. But when the 'primary key ' violation occurs , it stops=20 Then and there and data is not updated into the tables. Also in the CSV file the number of columns is not fixed , its varies=20 In number , it can range anywhere between 1 -22, I need to figure out a way such that I need to update only those columns which are present=20 In the CSV file . This of course I would like to accomplish using COPY command , Please let me know if at all this is possible in postgresql 8.1 Thanks and regards, Rajendra Singh =20 Wipro Technologies Plot No. 72, Hosur Main road Keonics Electronics City Bangalore- 560100, INDIA I believe we should all pay our tax with a smile. I tried - but they wanted cash The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.=20 WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email. =20 www.wipro.com ------_=_NextPart_001_01C7961F.89E076CC Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable ignoring primary key violations in COPY command

Hi all,=

We are= importing the data from the CSV file into the database using COPY= command.= But when the ‘primary key ‘ violation occurs , it stops=

Then= and there and data is not updated= into the= tables. Also= in the CSV file the number of columns is not fixed ,= its varies=

In= number , it can range anywhere between 1= -22, I need to figure out a way such that I need= to update only= those columns which are present

In the= CSV file . This of course  I would like to accomplish using COPY command , Please let= me know if at all this is possible in postgresql 8.1

Thanks and regards,

Rajendra Singh

 

Wipro= Technologies

Plot= No. 72, Hosur Main road

Keonics Electronics City

Bangalore- 560100, INDIA

I believe= we should all pay our tax with a smile. I tried - but they wanted= cash


The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and= may contain proprietary, confidential or privileged information. If you= are not the intended recipient, you should not disseminate, distribute or= copy this e-mail. Please notify the sender immediately and destroy all= copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient= should check this email and any attachments for the presence of viruses.= The company accepts no liability for any damage caused by any virus= transmitted by this email.

www.wipro.com
------_=_NextPart_001_01C7961F.89E076CC--