pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gurjeet Singh <singh.gurjeet@gmail.com>
To: Joe <dev@freedomcircle.net>
Cc: Gavin 'Beau' Baumanis <gavinb@eclinic.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Select into
Date: Thu, 20 Mar 2008 20:00:38 +0530
Message-ID: <65937bea0803200730j6e45ba51raeb7df564e49177a@mail.gmail.com> (raw)
In-Reply-To: <47E268CF.3040604@freedomcircle.net>
References: <94F93C0F-DA95-4435-B253-57C90961DF34@eclinic.com.au>
	<20080320104922.GB18935@a-kretschmer.de>
	<65937bea0803200358i290bdc87hdeca777b593b5df1@mail.gmail.com>
	<786D2B38-CE0A-41BF-9E70-4DEB22F8D9EF@eclinic.com.au>
	<47E25447.6040109@freedomcircle.net>
	<65937bea0803200613k4593da12hd62233f8a745309@mail.gmail.com>
	<47E268CF.3040604@freedomcircle.net>

On Thu, Mar 20, 2008 at 7:08 PM, Joe <dev@freedomcircle.net> wrote:

> Gurjeet Singh wrote:
> > Except that it doesn't work... Did you try to execute that query; I am
> > assuming not.
> Of course I did,


My bad... I did not run your query either, and based my assumption on my
previous attempt that had thrown an error. Here's something similar to what
had failed in my previous attemt:

update t1  *as e1* set e1.col2 = t1copy.col2, e1.col3 = t1copy.col3
from t1 as t1copy
where e1.col1 = 1 and t1copy.col1 = 3;


    As you can see, I had aliased the main table t1, and hence the error.

Best regards,

-- 
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: <65937bea0803200730j6e45ba51raeb7df564e49177a@mail.gmail.com>
Permalink:  ../65937bea0803200730j6e45ba51raeb7df564e49177a@mail.gmail.com/
Also on:    postgresql.org/message-id/65937bea0803200730j6e45ba51raeb7df564e49177a@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, dev@freedomcircle.net, gavinb@eclinic.com.au
  Subject: Re: Select into
  In-Reply-To: <65937bea0803200730j6e45ba51raeb7df564e49177a@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