Finding Unmatched values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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,
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top