From: | Abdul Karim <karim(at)thehub(dot)co(dot)uk> |
---|---|
To: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | importing in sql |
Date: | 2000-07-10 22:03:08 |
Message-ID: | 396A481C.D8D4E21@thehub.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)thehub(dot)co(dot)uk
URL: http://www.thehub.co.uk
From | Date | Subject | |
---|---|---|---|
Next Message | Zot O'Connor | 2000-07-11 00:29:47 | Finding entries not in table..differnce? |
Previous Message | Ed | 2000-07-10 21:58:36 | Error : Unknown address family (0) |