Dotan Cohen Update on inner join - looks good to me, where did I go wrong?
Sep 09, 2011; 23:09
Dotan Cohen
Update on inner join - looks good to me, where did I go wrong?
I'm trying to update on an join, but I can't find my error:
UPDATE `userTable` SET `someField`="Jimmy Page" FROM `userTable` INNER JOIN `anotherTable` ON `userTable.userid`=`anotherTable.userid` WHERE `userTable.someField`="Jim Morrison" AND `anotherTable.date` < NOW();
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM
That error is for reserved words, and I am escaping all the fields and tables (using the backticks). So why the error?
This is on a CentOS 4 or 5 server, with MySQL 5.0.77, accessed from the CLI. Thanks!
-- Dotan Cohen
http://gibberish.co.il http://what-is-what.com
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=listsearcharchive@lassosoft.com
Sep 10
Dotan Cohen Re: Update on inner join - looks good to me, where did I go wrong?
Sep 10, 2011; 00:01
Dotan Cohen
Re: Update on inner join - looks good to me, where did I go wrong?
Sep 10
Carsten Pedersen Re: Update on inner join - looks good to me, where did I go wrong?
Sep 10, 2011; 00:48
Carsten Pedersen
Re: Update on inner join - looks good to me, where did I go wrong?
Sep 10
Dotan Cohen Re: Update on inner join - looks good to me, where did I go wrong?
Sep 10, 2011; 12:27
Dotan Cohen
Re: Update on inner join - looks good to me, where did I go wrong?
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!