Re: [SQL] numbering rows on import from file

2008-05-02 Thread Steve Crawford
Alexy Khrabrov wrote: Greetings -- I have a huge table of the form (integer,integer,smallint,date). Its origin is an ASCII file which I load with \copy. Now I want to number the rows, adding an id column as an autoincrement from a sequence. How should I do the import now for the sequence to

Re: [SQL] numbering rows on import from file

2008-05-02 Thread Scott Marlowe
On Fri, May 2, 2008 at 3:26 PM, Alexy Khrabrov <[EMAIL PROTECTED]> wrote: > Greetings -- I have a huge table of the form > (integer,integer,smallint,date). Its origin is an ASCII file which I load > with \copy. Now I want to number the rows, adding an id column as an > autoincrement from a sequen

Re: [SQL] numbering rows on import from file

2008-05-02 Thread chester c young
--- Alexy Khrabrov <[EMAIL PROTECTED]> wrote: > Now I want to number the rows, adding an id column > as an autoincrement from a sequence. How should I do the import now > for the sequence to work -- should I add the id column last, so it > will not be filled by copy and presumably autoincrem

[SQL] numbering rows on import from file

2008-05-02 Thread Alexy Khrabrov
Greetings -- I have a huge table of the form (integer,integer,smallint,date). Its origin is an ASCII file which I load with \copy. Now I want to number the rows, adding an id column as an autoincrement from a sequence. How should I do the import now for the sequence to work -- should I a