agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Benoit Menendez <benoitm@pacbell.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem with self-join updates...
Date: Tue, 19 Feb 2002 14:06:46 -0500
Message-ID: <6776.1014145606@sss.pgh.pa.us> (raw)
In-Reply-To: <002b01c1b973$bf48c740$0201a8c0@osprey>
References: <002101c1b650$18f087a0$0201a8c0@osprey>
<002b01c1b973$bf48c740$0201a8c0@osprey>
Benoit Menendez <benoitm@pacbell.net> writes:
> I have the following self-join update:
> update TABLE set PARENT_ID=parent.PARENT_ID
> from TABLE, TABLE parent
> where TABLE.PARENT_ID=parent.ID
> and parent.ID in (1,2,3,4)
> Table name "table" specified more than once
Wasn't this answered already? You should not have the "from TABLE"
in there. Essentially, there's already an implicit FROM entry for
the target table, you don't need another. "from TABLE parent"
is sufficient here.
regards, tom lane
view thread (5+ messages) latest in thread
Message-ID: <6776.1014145606@sss.pgh.pa.us>
Permalink: ../6776.1014145606@sss.pgh.pa.us/
Also on: postgresql.org/message-id/6776.1014145606@sss.pgh.pa.us
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: tgl@sss.pgh.pa.us, benoitm@pacbell.net
Subject: Re: Problem with self-join updates...
In-Reply-To: <6776.1014145606@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox