Hi all,

I'm using mysql 3.23.54 under RedHat9 trying to update a field named
pac_fone in a table named paciente with the value of a field named
ita_fone from a table named italica as follows:

update paciente
        SET     pac_fone        =       (select ita_fone
                from    italica i, paciente p
                where   i.ita_matricula =       p.pac_matricula
                and     i.ita_dv        =       p.pac_dv);

and got the following error:

mysql> update paciente
    ->         SET     pac_fone        =       (select ita_fone
    ->                 from    italica i, paciente p
    ->                 where   i.ita_matricula =       p.pac_matricula
    ->                 and     i.ita_dv        =       p.pac_dv);
ERROR 1064: You have an error in your SQL syntax near 'select ita_fone
                from    italica i, paciente p
                wh' at line 2

Can anybody help me with it?

Regards,

Laercio.



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

Reply via email to