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