Ver Mensaje Individual
  #6 (permalink)  
Antiguo 14/10/2009, 04:07
ostraspedrin2000
 
Fecha de Ingreso: octubre-2009
Mensajes: 5
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: inserción con control de integridad

Al final he seguido tu consejo y he terminado con una INSERT rápida del tipo:

INSERT INTO tablaA a (a.campoA, a.campoB)
SELECT b.campoA, b.campoB
FROM tablaB b
WHERE b.campoA IN (SELECT campoA FROM tablaC)
AND b.campoB IN (SELECT campoA FROM tablaD);

La INSERT funciona correctamente con un tiempo aceptable.

Muchas gracias.