|
Esa sentencia no es correcta para el db2 del iseries. En su lugar
utiliza la siguiente: update tabla1 a set campo2 = (select max(campo7) from tabla2 b where b.campo8 = a.campo4). Utilizo max() para asegurarme de que el subselect devuelve solo un registro. Fernando Pérez Cerámica Saloni. Dpto. Auditoría y Organización En/na jose manuel lopez gestal ha escrit: evidentemente era un problema de biblioteca, pero ahora me da un errorUPDATE tabla1 SET campo2 = tabla2.campo7 FROM tabla1, tabla2 WHERE tabla2.campo8 = tabla1.campo4 ahora ya no sale: El calificador de columna o tabla tabla2 no está definido. dice: Palabra clave FROM inesperada. Símbolos válidos: <FIN DE SENTENCIA>.No estoy seguro, pero me suena a lista de bibliotecas. Pedro Pinedo Hernandez: Analista-Programador Grupo Amcor Flexibles Hispania S.L. Departamento de Informática / IT Department tfno.:+34 941 28 60 90 - 941 03 01 39 fax: +34 941 20 75 43 Avd. Burgos 67-95 26006 Logroño Spain [EMAIL PROTECTED] (quitar nospam del dominio, para enviar) _______________________________________________ AMCOR FLEXIBLES - LEADING THROUGH INNOVATION _______________________________________________ CAUTION - This message may contain privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify AMCOR FLEXIBLES immediately. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of AMCOR FLEXIBLES.************************************** José Manuel López Gestal Dpto. Sistemas de Información Hospital Modelo http://www.hospitalmodelo.com ************************************** Este mensaje puede contener Información Privilegiada o Confidencial. Si Vd. no es el destinatario indicado en este mensaje (o el responsable de la entrega del mensaje a dicha persona), no debe copiar o entregar este mensaje a ninguna persona. Por el contrario, debe destruir este mensaje y notificárnoslo inmediatamente. This e-mail and any attachment contains information which is private and confidential and is intended for the addressee only. If you are not an addressee, you are not authorised to read, copy or use the e-mail or any attachment. If you have received this e-mail in error, please notify the sender by return e-mail and then destroy it. __________________________________________________ Forum.HELP400 es un servicio más de NEWS/400. © Publicaciones Help400, S.L. - Todos los derechos reservados http://www.help400.es _____________________________________________________ Para darte de baja visita la siguente URL: http://coyote.combios.es/mailman/listinfo/forum.help400 |
begin:vcard fn;quoted-printable:Fernando P=C3=A9rez n;quoted-printable:P=C3=A9rez;Fernando org;quoted-printable:;Auditor=C3=ADa y Organizaci=C3=B3n email;internet:[EMAIL PROTECTED] tel;work:Ext. 627 x-mozilla-html:TRUE version:2.1 end:vcard
