I have a main query and a sub query. The sub query returns the correct number of rows, but the main query doubles the number of rows. I know why this is happening, but I don't know how to fix it. The main query returns a set of the rows from the sub query for each row in the main query. Here are the queries (simplified).
Any help would be much appreciated.
Paco
******************************
SUBQUERY: qryPartsReceivedByAccount
SELECT PO, Part, Account
FROM tblOrder RIGHT JOIN tblOrderDetail ON tblOrder.OrderID = tblOrderDetail.OrderID;
MAIN QUERY
SELECT Part, DateTrans, qryPartsReceivedByAccount.Account, qryPartsReceivedByAccount.PO
FROM tblPartLog INNER JOIN qryPartsReceivedByAccount ON (tblPartLog.PONumber = qryPartsReceivedByAccount.PO) AND (tblPartLog.Part = qryPartsReceivedByAccount.Part);
Posted by: paco6945@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar