A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Finding Unmatched values



 
 
Thread Tools Display Modes
  #1  
Old September 7th, 2005, 01:12 AM
Carlee
external usenet poster
 
Posts: n/a
Default Finding Unmatched values

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,
--
Carlee
  #2  
Old September 7th, 2005, 01:13 AM
Ofer
external usenet poster
 
Posts: n/a
Default

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


"Carlee" wrote:

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

  #3  
Old September 7th, 2005, 01:14 AM
Ofer
external usenet poster
 
Posts: n/a
Default

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


"Carlee" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting WBS numbers roccogrand Running & Setting Up Queries 7 August 25th, 2005 05:10 AM
Combine FREQUENCY and SUM of Associated Values MichaelC Worksheet Functions 3 July 3rd, 2005 01:54 AM
Combo box returns numeric values Joe Running & Setting Up Queries 5 December 1st, 2004 03:03 PM
Unmatched Query Mess Natalia Running & Setting Up Queries 8 October 28th, 2004 02:36 PM
Finding Duplicate Values on the Same Record Ting Running & Setting Up Queries 4 September 17th, 2004 01:24 PM


All times are GMT +1. The time now is 08:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.