List:General Discussion« Previous MessageNext Message »
From:Ing. Edwin Cruz Date:March 16 2006 3:24pm
Subject:RE: Error 1064: update .....select nested.
View as plain text  
update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2
where column2='sales@stripped'
And column1 = 'sales@stripped'



Or:


update TABLE1 a, TABLE2 b set a.FIELD1=b.FIELD2
where b.column2=a.column1
And column1 = 'sales@stripped'


Regards!

-----Mensaje original-----
De: Truong Tan Son [mailto:sontt@stripped] 
Enviado el: Miércoles, 15 de Marzo de 2006 07:22 p.m.
Para: mysql@stripped
Asunto: Error 1064: update .....select nested.


Dear Sir,

MySQL-4.1.12 on RedHat Linux EL4:

mysql> update TABLE1 set FIELD1=(select FIELD2  from TABLE2 where 
mysql> COLUMN2=
'sales@stripped') where COLUMN1='sales@stripped';

ERROR 1064: You have an error in your SQL syntax.  Check the manual that
corresp onds to your MySQL server version for the right syntax to use near
'select FIELD2 from TABLE2 where COLUMN2='sales@stripped

mysql>

For MySQL -5.0.18   is   Ok

Syntax error for version 4.1.12 ?

Thanks you and best regards,
--

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=1


Thread
Error 1064: update .....select nested.Truong Tan Son16 Mar
  • RE: Error 1064: update .....select nested.Ing. Edwin Cruz16 Mar
    • RE: Error 1064: update .....select nested.SGreen16 Mar
      • (SOLVED) Re: Error 1064: update .....select nested.Truong Tan Son17 Mar