Need help creating query

angellrp

Registered User.
Local time
Today, 03:52
Joined
Feb 26, 2003
Messages
18
Hi,

Please can someone help me create a query that looks up two queries and comes back with the lines that don't match.

Basically I have two queries (qry1 & qry2) with both have a number field - AA_NO and a date field - AA_DATE.

I want to find the records in the queries that don't have the same date for the same number i.e. rows 1, 2, 5 and 6 from below

Row AA_NO AA_DATE Query
1 456 15/05/2008 qry1
2 456 16/05/2008 qry2
3 789 26/11/2008 qry1
4 789 26/11/2008 qry2
5 963 21/08/2008 qry1
6 963 16/09/2008 qry2


However I've tried a few different queries but I'm really floundering here.
Any help would be greatly appreciated.

Thanks
Angela
 
Have you used the unmatched query wizard?
 
Yeah but the problem I get is that it does not show the detai;s of both queries which differ. and I can't seem to get it to check both the number and the date as I don't want the records that don't have an AA_No in both queries. does that make sense?

I need to check that the dates for the number in each query are the same and to highlight any differences so that these can be investigated.

Thanks
 
Find where the queries agree on numbers but not on dates - maybe this:

SELECT * FROM qry1
INNER JOIN qry2
ON qry1.AA_No = qry2.AA_NO
AND qry1.AA_Date <> qry2.AA_Date
 

Users who are viewing this thread

Back
Top Bottom