You can't have two tables in the UPDATE query, at least not in v3.x of
MySQL. I'm not sure about version 4. That's why it's complaining about
table2. I think the SUBSTRING_INDEX should be OK.
You may have to split your query into a series of queries. There is some
guidance in the MySQL manual.
Jo
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 SQ
Davy Obdam <[EMAIL PROTECTED]> wrote:
> 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 sy