RE: Update query with substring

2003-06-02 Thread jbonnett
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

Re: Update query with substring

2003-06-02 Thread Paul DuBois
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

Re: Update query with substring

2003-05-31 Thread Victoria Reznichenko
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