At 11:26 +0200 5/30/03, Davy Obdam wrote:
Hello people,

I am trying to run this query:

UPDATE table1, table2 SET table1.periode = table.periode WHERE table1.id = 3 AND SUBSTRING_INDEX( table1.name, '.', - 1 ) = table2.name

But i keep getting the same error message

You have an error in your SQL syntax near '
table2 SET table1.periode = table2.periode WHERE table1.id = 3 AND SUBSTRIN' at line 1


Is it possible to use a SUBSTRING_INDEX in a update query, or what i am i doing wrong?

That's not what the error message is telling you. It's complaining about the second table name prior to the SET keyword. My guess is that your version of MySQL is not recent enough to support multiple-table updates (which were implemented around 4.0.2 or so). What version is your server?


Any help is appreciated, thanks for your time


Best regards,

Davy Obdam

--
-----------------------------------------------------------------------
Davy Obdam Web application developer

Networking4all
email: [EMAIL PROTECTED]
email: [EMAIL PROTECTED]
internet: http://www.networking4all.com
-----------------------------------------------------------------------


--
Are you MySQL certified?, http://www.mysql.com/certification/
    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /    Mr. Paul DuBois <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Senior Technical Writer
 /_/  /_/\_, /___/\___\_\___/   Madison, Wisconsin, USA
        <___/   www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to