Ver Mensaje Individual
  #8 (permalink)  
Antiguo 20/07/2009, 11:03
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Cómo unir LEFT JOIN con RIGHT JOIN

vamos mas cerca con la solución.

Código sql:
Ver original
  1. (SELECT t1.letras letras1, SUM(t2.cantidad) cant1
  2. FROM tabla1 t1
  3. LEFT JOIN tabla2 t2
  4. ON t1.cantidad = t2.cantidad
  5. GROUP BY t1.letras)
  6. UNION
  7. (SELECT t1.letras, SUM (t2.cantidad) cant2
  8. FROM tabla2 t2
  9. RIGHT JOIN tabla1 t1
  10. ON t1.cantidad = t2.cantidad
  11. GROUP BY t1.letras)

La cosa es que no tengo como probarlo.
__________________
Without data, You are another person with an opinion.
W. Edwads Deming