Kamis, 22 Desember 2016

[MS_AccessPros] Query Returning Double Rows

 

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)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar