------=_Part_9287_8533679.1214250219565
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
Looking for the correct syntax for an UPDATE LEFT JOIN query in
PostgreSQL.
The equivalent MySQL query is :
UPDATE
Foo f LEFT JOIN Goo g on f.Foo_ID = g.Goo_ID
SET
f.Foo_ID = g.Goo_ID
WHERE
f.Foo_ID IS NOT NULL;
When I try to run this in Postgres, i get the following error:
ERROR: syntax error at or near "LEFT"
Is it possible to have UPDATE JOIN queries in PostgreSQL?
Thanks.
------=_Part_9287_8533679.1214250219565
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,<br><br>Looking for the correct syntax for an UPDATE LEFT JOIN query in
PostgreSQL.<br><br>The equivalent MySQL query is :<br><br><span
style="font-family: courier new,monospace;">
UPDATE</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
Foo f LEFT JOIN Goo g on f.Foo_ID = g.Goo_ID</span><br
style="font-family: courier new,monospace;"><span style="font-family:
courier new,monospace;"> SET</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">
f.Foo_ID = g.Goo_ID</span><br style="font-family:
courier new,monospace;"><span style="font-family: courier
new,monospace;"> WHERE</span><br style="font-family:
courier new,monospace;">
<span style="font-family: courier new,monospace;">
f.Foo_ID IS NOT NULL;</span><br><br><br> When I
try to run this in Postgres, i get the following error:<br><br><span
style="font-family: courier new,monospace;">ERROR: syntax error at
or near "LEFT"</span><br>
<br>Is it possible to have UPDATE JOIN queries in
PostgreSQL?<br><br>Thanks.<br>
------=_Part_9287_8533679.1214250219565--


|