Re: Select into

From: "Gurjeet Singh" <singh(dot)gurjeet(at)gmail(dot)com>
To: Joe <dev(at)freedomcircle(dot)net>
Cc: "Gavin 'Beau' Baumanis" <gavinb(at)eclinic(dot)com(dot)au>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Select into
Date: 2008-03-20 14:30:38
Message-ID: 65937bea0803200730j6e45ba51raeb7df564e49177a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Mar 20, 2008 at 7:08 PM, Joe <dev(at)freedomcircle(dot)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[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Craig Ringer 2008-03-20 14:34:40 Re: Rollback locks table - why?
Previous Message Jan Peters 2008-03-20 14:30:05 Re: Rollback locks table - why?