[eluser]adwin[/eluser]
Hi ...
I need help to translate this from oracle statements into mysql (especially the joins)
Code:
// oracle sql
select b.goodsid, sum(b.total) as total_inv, sum(d.total) as total_ci
from invoicehd a , invoicedt b, creditInvHd c, creditInvDt d
where a.id between $inv1 and $inv2
and a.invdate between $date1 and $date2
and b.invoice_id = a.id
and c.invoice_id = a.id (+)
and d.ciid = c.id
and d.goods_id = b.goods_id (+)
groups by b.goodsid
I have no idea how to do left join like that on mysql ...
is it possible ? or should i create 2 query and then do a union .... :p