Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   MySQL (https://www.clubdelphi.com/foros/forumdisplay.php?f=21)
-   -   Outer Join en mysql (https://www.clubdelphi.com/foros/showthread.php?t=37976)

jfontane 28-11-2006 16:54:43

Outer Join en mysql
 
Hola a todos quiero preguntarles como seria el Outer joins en mysql
ya que tengo la siguiente consulta en Oracle la que me anda perfecta.

select a.importe_ae as PERSONAL, b.importe_ae as PATRONAL

from aportes_exp a, aportes_exp b

where a.cuip_ae='20249128342' and
a.anio_ae=b.anio_ae(+) and
a.mes_ae=b.mes_ae(+) and
a.cuip_ae=b.cuip_ae(+) and
a.codigo_organismo_ae=b.codigo_organismo_ae(+) and
a.tipo_liquidacion_ae=b.tipo_liquidacion_ae(+) and
a.numero_liq_ae=b.numero_liq_ae(+) and

a.id_concepto_ae='01' and
b.id_concepto_ae(+)='02'

y mi pregunta es: como seria esto en mysql...ya que el signo (+) referido al outer join no se como se representa ... como seria esta consulta en el mysql.

Desde ya muchisimassss gracias y salu2

jfontane 28-11-2006 18:43:37

left join
 
Hice algo pero por favor necesito ayuda ......esto me da error con respecto a la consulta anterior.


select a.importe_ae as PERSONAL, b.importe_ae as PATRONAL
from aportes_exp b
LEFT JOIN aportes_exp a
ON b.anio_ae = a.anio_ae
ON b.mes_ae=a.mes_ae and
ON b.cuip_ae=a.cuip_ae and
ON b.codigo_organismo_ae=a.codigo_organismo_ae and
ON b.tipo_liquidacion_ae=a.tipo_liquidacion_ae and
ON b.numero_liq_ae=a.numero_liq_ae
WHERE a.cuip_ae='20249128342' and
a.id_concepto_ae='01' and
b.id_concepto_ae='02'


Alguien si me lo puede corregir
muchas gracias

roman 28-11-2006 19:05:48

Código SQL [-]
select a.importe_ae as PERSONAL, b.importe_ae as PATRONAL
from aportes_exp b
LEFT JOIN aportes_exp a ON
b.anio_ae = a.anio_ae and
b.mes_ae=a.mes_ae and
b.cuip_ae=a.cuip_ae and
b.codigo_organismo_ae=a.codigo_organismo_ae and
b.tipo_liquidacion_ae=a.tipo_liquidacion_ae and
b.numero_liq_ae=a.numero_liq_ae
WHERE a.cuip_ae='20249128342' and
a.id_concepto_ae='01' and
b.id_concepto_ae='02'

// Saludos


La franja horaria es GMT +2. Ahora son las 08:39:55.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi