MySQL Forums
Forum List  »  Spanish

help with a join
Posted by: Art Port
Date: August 02, 2007 08:21AM

Hi;

i have this sentence:

Select pro_codigo1,pro_nombre,pro_existencia,pro_minimo,dco_cantidad,(dco_fecha+prov_surtido) as arribo,dco_codigo,prov_clave
from productos left outer join dcompras on pro_codigo1=dco_codpro inner join proveedor pr on pro_prov=pr.id where dco_tipo='O' and pro_linea='L01'

there is 234 records on productos with pro_linea='L01' and i want all of them, the problem comes with the join on dcompras, not all the 234 records on productos had a corresponding record on dcompras and some records on productos had more than one correspondig record on dcompras (wich i want them all too).

how i can modify my query to solve this?

TIA

Options: ReplyQuote


Subject
Views
Written By
Posted
help with a join
3067
August 02, 2007 08:21AM
2307
August 02, 2007 08:46AM
2002
August 07, 2007 10:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.