Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/03/2009, 13:50
Avatar de pacmanaman
pacmanaman
 
Fecha de Ingreso: marzo-2009
Mensajes: 84
Antigüedad: 15 años, 2 meses
Puntos: 3
Respuesta: union avanzada de dos tablas

Esto te deberia funcionar ...
Código:
select 
	t1.*, -- PONE LOS CAMPOS QUE DESEES A MOSTRAR DE TABLA1
 	t2.*  -- PONE LOS CAMPOS QUE DESEES A MOSTRAR DE TABLA2
from 
	tabla t1
	join tabla2 t2 on t2.id_cal = t1.id_cal -- UNIS TABLA1 CON TABLA2
where
	t2.idmat = '119' and t1.idmat = '119' -- FILTRAMOS POR LOS ID