From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | <webmaster(at)robbyslaughter(dot)com>, "Fredrik Thunberg" <fredrik(at)datessa(dot)se>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Simple SQL-syntax |
Date: | 2001-08-20 20:21:25 |
Message-ID: | web-105344@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2001-08-20 22:06:45 | Re: Simple SQL-syntax |
Previous Message | omid omoomi | 2001-08-20 19:31:34 | split/explode functions |