MySQL Forums
Forum List  »  Portuguese

Problema no resultado de um query
Posted by: Hugo Araujo
Date: February 23, 2021 10:50AM

ola boa tarde,
Tenho o seguinte query:

select e.quantity, rl.quantity
from logistics_inout.reception r
left join logistics_inout.reception_line rl on
rl.reception_id = r.id
left join logistics_inout.reception_documents rd on
r.id = rd.reception_id
left join logistics_inout.document_line e on
rd.documents_id = e.document_id
where rl.reception_id = 5738
and rl.product_id = 20992
and e.product_id = 20992

o resultado é:

quantity quantity_1
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00
16.00 1.00
4.00 1.00


E deveria ser:
20 21

O código do produto era só para ver o resultado, porque se o query estiver a funcionar bem, não vou colocar o código do produto
Podem me ajudar, se faz favor

Options: ReplyQuote


Subject
Views
Written By
Posted
Problema no resultado de um query
436
February 23, 2021 10:50AM


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.