Re: copy from - Mailing list pgsql-sql

From Adam Lang
Subject Re: copy from
Date
Msg-id 000c01c006b4$71fd9ce0$330a0a0a@Adam
Whole thread Raw
In response to copy from  ("Adam Lang" <aalang@rutgersinsurance.com>)
Responses Re: copy from  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
I get it.  I upload to the temp table, then for the select/insert I just do
the nextval(seq_id) for the primary key field, correct?

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone23.bigpanda.com>
To: "Adam Lang" <aalang@rutgersinsurance.com>
Cc: <pgsql-sql@postgresql.org>
Sent: Monday, August 14, 2000 5:17 PM
Subject: Re: [SQL] copy from


>
> One way would be to copy the data into a temporary table that doesn't
> have the id field, and then
> insert into table (fields) select * from temptable;
>
> Stephan Szabo
> sszabo@bigpanda.com
>
> On Mon, 14 Aug 2000, Adam Lang wrote:
>
> > I need additional help involving the copy from command
> >
> > I have a database with several fields: id, name, address, zip
> >
> > id is the primary key and I use nextval to get a value.
> >
> > The file I want to upload is in comma separated value, that does not
have a
> > primry key (or an id) field.
> >
> > How would I use copy from and assign the correct id number?
> >
> > Adam Lang
> > Systems Engineer
> > Rutgers Casualty Insurance Company
> >



pgsql-sql by date:

Previous
From: "DalTech - CTE"
Date:
Subject: Re: Functions with Null Arguments?
Next
From: Sandis
Date:
Subject: data integrity