Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/07/2009, 11:20
edwinsp
 
Fecha de Ingreso: septiembre-2008
Mensajes: 75
Antigüedad: 15 años, 8 meses
Puntos: 1
Respuesta: Update usando inner entre tablas

Alli esta lo solicitado

--Tabla cabecera
create table cabecera(
codigo character(2) primary key,
fecha date,
total real not null,
);

--Tabla detalle
create table detalle(
codcab character(2) not null,
codigo character(2) not null,
importe1 real not null,
importe2 real not null,
fecha date
);

update c set d.fecha=c.fecha
from cabecera c inner join detalle d on c.codigo=d.codcab;

gracias