From: Brandon Shuey Date: March 18 1999 10:46pm Subject: SQL Question??: Using Join in Update List-Archive: http://lists.mysql.com/mysql/527 Message-Id: <000501be7191$3b6abc80$48c92499@shueybox> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01BE715E.F0D04C80" ------=_NextPart_000_0006_01BE715E.F0D04C80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I am running mySQL under NT4.0. I am trying a simple update statement that does a left join and updates on null values. The exact same join works in a select statement but will not work in a update statement. I get the following error: ERROR 1064 at line1: parse error near 'LEFT JOIN table2 ON table1.ID=table2.Field' This is the select statement that works correctly: SELECT table1.* FROM table1 LEFT JOIN table2 ON(table1.ID = table2.Field) WHERE (((table2.Field) is NULL)) Here is the update that doesn't work: UPDATE table1 LEFT JOIN table2 ON table1.ID = table2.Field SET table1.ID = "Invalid" WHERE (((table2.Field) Is Null)); The documentation does not address joins in Update queries so I do believe this is a valid question. Brandon Shuey WebCentric Inc. (316) 612-8030 brandon@stripped ------=_NextPart_000_0006_01BE715E.F0D04C80--