Received: from server1.thehub.co.uk (www.thehub.co.uk [194.205.173.66]) by hub.org (8.10.1/8.10.1) with ESMTP id e6AG2aW47875 for ; Mon, 10 Jul 2000 12:02:36 -0400 (EDT) Received: from thehub.co.uk (pc27.thehub.co.uk [194.205.173.93]) by server1.thehub.co.uk with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id NJ2TG1GY; Mon, 10 Jul 2000 17:01:45 +0100 Message-ID: <396A481C.D8D4E21@thehub.co.uk> Date: Mon, 10 Jul 2000 17:03:08 -0500 From: Abdul Karim X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgreSQL.org Subject: importing in sql Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/129 Hi, I am trying to import loads of data into postgres, I am having trouble with a field which is a sequence. I know how to import data using a delimiter with the copy command. But I need to know how I increase the sequence on each line of import. My Table has the following format. field1 serial primary key, field2 char (50), field3 char(50), field4 int, field5 date The file has the following format field2|field3|field4|field5| Each field is separated by a | (pipe), How do I insert the sequence number before field2? I have like 30 files in this format and I need to import them in one table with each line having unique number. Has anyone come across similar situation? any help would be greatly appreciated. Please let me know if you need more info. Thanks in advance. -- Abdul Karim The Hub Communications Company Ltd. The Farmhouse Syon Park Middlesex TW8 8JF T: 020 8560 9222 (ext 243) F: 020 8560 9333 Email: mailto:Karim@thehub.co.uk URL: http://www.thehub.co.uk