MySQL Forums
Forum List  »  Spanish

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


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 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?


Options: ReplyQuote

Written By
help with a join
August 02, 2007 08:21AM
August 02, 2007 08:46AM
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.