Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Update Join Que...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 15883 of 17437
Post > Topic >>

Update Join Query

by daniel.futerman@[EMAIL PROTECTED] ("Daniel Futerman") Jun 23, 2008 at 09:43 PM

------=_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;">&nbsp;&nbsp;&nbsp;
UPDATE</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 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;">&nbsp;&nbsp;&nbsp; SET</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; f.Foo_ID = g.Goo_ID</span><br style="font-family:
courier new,monospace;"><span style="font-family: courier
new,monospace;">&nbsp;&nbsp;&nbsp; WHERE</span><br style="font-family:
courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; f.Foo_ID IS NOT NULL;</span><br><br><br>&nbsp;When I
try to run this in Postgres, i get the following error:<br><br><span
style="font-family: courier new,monospace;">ERROR:&nbsp; syntax error at
or near &quot;LEFT&quot;</span><br>
<br>Is it possible to have UPDATE JOIN queries in
PostgreSQL?<br><br>Thanks.<br>

------=_Part_9287_8533679.1214250219565--
 




 3 Posts in Topic:
Update Join Query
daniel.futerman@[EMAIL PR  2008-06-23 21:43:39 
Re: Update Join Query
renjin25@[EMAIL PROTECTED  2008-06-23 13:11:51 
Re: Update Join Query
renjin25@[EMAIL PROTECTED  2008-06-23 13:29:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 16:28:56 CST 2008.