From: Josh Berkus <josh@agliodbs.com>
To: sqllist <pgsql-sql@postgresql.org>
Subject: No JOINs in UPDATE ... FROM?
Date: Thu, 26 Apr 2001 10:42:54 -0700
Message-ID: <3AE85E1E.2D39D02D@agliodbs.com> (raw)
Folks,
In 7.1 RC2, I've been trying to use the following JOIN syntax:
UPDATE assignments SET status = -1
FROM assignments JOIN orders ON assignments.order_usq = orders.usq
WHERE orders.status = -1;
However, I get an error of "Relation assignments referenced twice in
query."
Now, I can (and have) re-phrase the query so that PostgreSQL will
accept it. However, I was under the impression that the above was
standard SQL92. Am I mistaken? Or is this form something that just
hasn't been implemented yet?
-Josh
--
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com
Subject: Re: No JOINs in UPDATE ... FROM?
In-Reply-To: <3AE85E1E.2D39D02D@agliodbs.com>
References: <3AE85E1E.2D39D02D@agliodbs.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