From: Josh Berkus <josh@agliodbs.com>
To: webmaster@robbyslaughter.com
To: Fredrik Thunberg <fredrik@datessa.se>
To: pgsql-sql@postgresql.org
Subject: Re: Simple SQL-syntax
Date: Mon, 20 Aug 2001 13:21:25 -0700
Message-ID: <web-105344@davinci.ethosmedia.com> (raw)
In-Reply-To: <EPEHLKLEHAHLONFOKNHNMEPEDEAA.webmaster@robbyslaughter.com>
Robby,
> There's no FROM clause in an update statement. And second, you
> need to be careful to make sure all your tokens make sense. You
> had an extra "B" in the middle of your statement. Based on this:
Actually, Postgres *does* support UPDATE ... FROM. I use it quite a
bit. The syntax can be fussy, however.
The following is perfectly valid in Postgres, although not 100% ANSI-92
kosher:
UPDATE A SET 1 = B.2
FROM B
WHERE A.2 = B.2
Fredrik's problem may be simply the table reference after SET; that's
why I'd like to see his exact parse error message.
-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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, webmaster@robbyslaughter.com, fredrik@datessa.se
Subject: Re: Simple SQL-syntax
In-Reply-To: <web-105344@davinci.ethosmedia.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