pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gurjeet Singh <singh.gurjeet@gmail.com>
To: Gavin 'Beau' Baumanis <gavinb@eclinic.com.au>
Cc: pgsql-sql@postgresql.org, "A. Kretschmer" <andreas.kretschmer@schollglas.com>
Subject: Re: Select into
Date: Thu, 20 Mar 2008 16:28:07 +0530
Message-ID: <65937bea0803200358i290bdc87hdeca777b593b5df1@mail.gmail.com> (raw)
In-Reply-To: <20080320104922.GB18935@a-kretschmer.de>
References: <94F93C0F-DA95-4435-B253-57C90961DF34@eclinic.com.au>
	<20080320104922.GB18935@a-kretschmer.de>

On Thu, Mar 20, 2008 at 4:19 PM, A. Kretschmer <
andreas.kretschmer@schollglas.com> wrote:

> am  Thu, dem 20.03.2008, um 20:57:53 +1100 mailte Gavin 'Beau' Baumanis
> folgendes:
> > Hi Everyone,
> >
> > I have asked our DBA at work and h is not too sure either... so I
> > thought it best to on the list.
> >
> > Basically, what I am after is a way to copy the contents of one record
> > into another.
> > Something like select into; but where the destination record already
> > exists, as opposed to creating a new record.
>
> insert into <table> select from <table> where ...
>
>
He specifically asked for

<snip>

where the destination record already
exists, as opposed to creating a new record.

</snip>


    I think an UPDATE with joins would be helpful. Though, it may become
lengthy if the tables have too many columns.

    Can you post your exact requirement?

-- 
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

17° 29' 34.37"N, 78° 30' 59.76"E - Hyderabad *
18° 32' 57.25"N, 73° 56' 25.42"E - Pune
37° 47' 19.72"N, 122° 24' 1.69" W - San Francisco

http://gurjeet.frihost.net

Mail sent from my BlackLaptop device

view thread (43+ messages)  latest in thread

Message-ID: <65937bea0803200358i290bdc87hdeca777b593b5df1@mail.gmail.com>
Permalink:  ../65937bea0803200358i290bdc87hdeca777b593b5df1@mail.gmail.com/
Also on:    postgresql.org/message-id/65937bea0803200358i290bdc87hdeca777b593b5df1@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: singh.gurjeet@gmail.com, gavinb@eclinic.com.au, andreas.kretschmer@schollglas.com
  Subject: Re: Select into
  In-Reply-To: <65937bea0803200358i290bdc87hdeca777b593b5df1@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox