Finding Unmatched values

C

Carlee

Hi there,

I have a report that shows impression reads for two consequetive months. I
am looking for a way to alter my query to allow me to see all devices that
did not have a value for either the previous month or the current month.

For example, device A could have an impression for this month, but didn't
for the last month, or vice versa. How can I alter my query to accomplish
this.

Regards,
 
O

Ofer

Another option will be - with one query

SELECT T1.devices
FROM MyTableName as T1
WHERE T1.devices Not In (SELECT T2.Id FROM MyTableName as T2
WHERE T2.MyMonth=[Previous Month]) AND T1.MyMonth=[Current Month]

Will return all the devices from this month that doesnt apear in the prev
month
 
O

Ofer

Create three queries
1. Return all the devices for this month
2. Return all the devices for prev month
3. Create a query, using the wizard, for unmatch records, that joins the two
queries above
 
Top