a ver
si te sirve esto, el coalesce es para que te acepte Nulos
update MOLDEO/FSMOL910 F SET AVGDAY
=(Select COALESCE(A.AAVGD, F.AVG
DAY) from LIBGSTEST/ITEMAVG A where A.AITEM=F.BCHLD1)
DAY) from LIBGSTEST/ITEMAVG A where A.AITEM=F.BCHLD1)
Saludos
Gerardo Santillana
IT Department
Delphi Mechatronic
Systems
Phone USA (956) 554 5832
Phone MX 01868 8128163
x.5832
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Felix Arellano Tamez
Sent: Tuesday, January 11, 2005 9:51 AM
To: [email protected]
Subject: Actualizacion usando SQL
Hola foro!!!
Sabe alguien sobre alguna manera de actualizar usando sentencias SQL una tabla con datos de otra tabla; Algo asi como
update tabla1 set tabla1.x = tabla2.x where tabla1.y=tabla2.y
Gracias por su tan oportuna y pecisa ayuda!!
| **************************************************************************************** Note: The information contained in this message may be privileged and confidential and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. **************************************************************************************** |
<<ATT128547.gif>>
