• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

Microsoft Access - Query

I have two queries within access.  Query 1 - contains all accounts that have been opened from Jan 1 - Dec 31, 2010.   Query 2 contains all accounts opened from Jan 1 2010 - March 15 2011.  Is there a way to identify the new accounts that have been opened?   Those that are new will not be duplicated on Query 2.  Is there a way to determine which ones have not been duplicated?
0
ArisaAnsar
Asked:
ArisaAnsar
1 Solution
 
Wayne MichaelSenior Software DeveloperCommented:
Do you have table structures and query?

depends on the data available to you.

0
 
als315Commented:
Left join your queries (Account field): select all from Query 1 with criteria: is Null for any field from Query 2
0
 
gmartinncCommented:
It seems your dates are a little wonky.  Is the second range Jan 1 2011 - March 15 2011?

If so, I think you are asking for something like this:
SELECT * FROM Query2 WHERE OpenDate NOT IN (SELECT OpenDate FROM Query1)

Is that correct?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Luke ChungPresidentCommented:
What you need is a "non-in" query, otherwise known as an Outer Join between your two queries.

We have a paper Microsoft Access/SQL Server Query Tip: Finding Records in One Table but Not Another with "Not In" Queries here:  
http://www.fmsinc.com/microsoftaccess/query/outer-join/index.html

Hope this helps.
0
 
ArisaAnsarAuthor Commented:
The Microsoft Access/SQL Server Query Tip is incredibly helpful and got me to the solution.  Thank you very much.
0
 
gmartinncCommented:
Hmmm.  seems to me I just said that.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now