If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Exclude records in qry1 if the same record ID is found in qry2 ..
In short: I have two join query, qryJoinApproved and qry JoinPending. How can
I excluded rercords from showing in qryJoinApproved if the same record ID is found in qryJoinPending. |
#2
|
|||
|
|||
Exclude records in qry1 if the same record ID is found in qry2 ..
Join the two queries, setting a Left Join (click on join line, set all from
A and only those from B ..) and set criteria for the join field in B IS NOT NULL "Silvio" wrote in message ... In short: I have two join query, qryJoinApproved and qry JoinPending. How can I excluded rercords from showing in qryJoinApproved if the same record ID is found in qryJoinPending. |
#3
|
|||
|
|||
Exclude records in qry1 if the same record ID is found in qry2
David thank you for your replay, however I don't full understand the steps I
need to take, If you would please be more specific step-by-step (setting a Left Join, click on join line?????) Thank you, Silvio "David F Cox" wrote: Join the two queries, setting a Left Join (click on join line, set all from A and only those from B ..) and set criteria for the join field in B IS NOT NULL "Silvio" wrote in message ... In short: I have two join query, qryJoinApproved and qry JoinPending. How can I excluded rercords from showing in qryJoinApproved if the same record ID is found in qryJoinPending. |
#4
|
|||
|
|||
Exclude records in qry1 if the same record ID is found in qry2
I am asuming minimal knowledge as I do not know what you know.
Open a new query in the normal query design window. In the add tables dialogue select queries, and add your two queries. Click on the record id in one query and drag it over the corresponding record id in the other query and release the mouse button. (Drag and drop). You should see a line joining these two fields. This is called a join. If you look at it in SQL view you will see that it is an inner join. This query will select all of the records that match. Diouble click on that join line. A join properties window should appear. Click on the option that gives you all of the records from the query that you want and only those that match from the other. If you look at SQL view you will see that this is now either a LEFT JOIN or a RIGHT JOIN. The record id from the ALL table will be present in all lines returned from this query, whilst the record id in the "Only matched" table will sometimes be NULL, because there is no record that matches. A test for NULL in the record id of "Only matched" table will identify those that do not have matches. So IS NULL in the Criteria for that record id will identify the records that you want, those that do not have a match. I hope you can make sense of this explanation, it is late here, and I have struggled a bit. As long as you are not changing anything, it does not hurt to experiment and look at the results and the SQL generated.. You will get a feel for it. "Silvio" wrote in message ... David thank you for your replay, however I don't full understand the steps I need to take, If you would please be more specific step-by-step (setting a Left Join, click on join line?????) Thank you, Silvio "David F Cox" wrote: Join the two queries, setting a Left Join (click on join line, set all from A and only those from B ..) and set criteria for the join field in B IS NOT NULL "Silvio" wrote in message ... In short: I have two join query, qryJoinApproved and qry JoinPending. How can I excluded rercords from showing in qryJoinApproved if the same record ID is found in qryJoinPending. |
Thread Tools | |
Display Modes | |
|
|