• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 286
  • 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
 
wrmichaelCommented:
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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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