importing in sql
От | Abdul Karim |
---|---|
Тема | importing in sql |
Дата | |
Msg-id | 396A481C.D8D4E21@thehub.co.uk обсуждение исходный текст |
Ответы |
Re: importing in sql
Re: importing in sql |
Список | 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@thehub.co.uk URL: http://www.thehub.co.uk
В списке pgsql-sql по дате отправления: