?
Solved

Access 2007 query

Posted on 2013-01-30
5
Medium Priority
?
258 Views
Last Modified: 2013-01-31
Good day everyone. I have a dilemma. I have a query that I am attempting to construct in Access 2007. It has a unique id and 5 different values for 5 different years.

What I want to do is write the query where is all 5 values are the same value, do not include.

How can this be done?
0
Comment
Question by:mig1980
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 38837567
An example would be helpful :)
0
 

Author Comment

by:mig1980
ID: 38837584
Here is an example as data attached.

In this example the query I am trying to construct would all columns in  ID 6344, 6754, 5986, and 5846 as the other two ID have all the same values in all 5 year columns.
Book1.xlsx
0
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 1200 total points
ID: 38837652
You could do it with boolean logic in a WHERE clause:

SELECT *
FROM SomeTable
WHERE Not (Year08 = Year09 And Year08 = Year10 And Year08 = Year11 And Year08 = Year12)

Open in new window

0
 

Author Comment

by:mig1980
ID: 38837675
I will give this  a try and see if it works.
0
 

Author Comment

by:mig1980
ID: 38841158
Thank you very much. That worked well.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question