Re: Copying - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: Copying
Date
Msg-id D6B5DF48-02F6-11D9-A626-000A95C88220@myrealbox.com
Whole thread Raw
In response to Copying  (Jake Stride <nsuk@users.sourceforge.net>)
List pgsql-novice
On Sep 10, 2004, at 3:36 PM, Jake Stride wrote:

> What I want to be able to do is:
>
> SELECT name, 3 FROM assets <<INTO>> assets
>
> Since id is a serial/has a default value you don't need to worry about
> it
> (iei the database should take care of it).

I think what you want to do is something along the lines of

INSERT INTO assets (name, jobno)
    SELECT distinct name, 3
    FROM assets
;

Michael


pgsql-novice by date:

Previous
From: Jake Stride
Date:
Subject: Copying
Next
From:
Date:
Subject: Opinions Requested - PG API or Abstraction Layer