Solved

Microsoft Access - Query

Posted on 2011-03-17
6
251 Views
Last Modified: 2012-05-11
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
Comment
Question by:ArisaAnsar
6 Comments
 
LVL 11

Expert Comment

by:wrmichael
ID: 35159552
Do you have table structures and query?

depends on the data available to you.

0
 
LVL 40

Expert Comment

by:als315
ID: 35159564
Left join your queries (Account field): select all from Query 1 with criteria: is Null for any field from Query 2
0
 
LVL 1

Expert Comment

by:gmartinnc
ID: 35159586
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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 10

Accepted Solution

by:
Luke Chung earned 500 total points
ID: 35160100
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
 

Author Closing Comment

by:ArisaAnsar
ID: 35168516
The Microsoft Access/SQL Server Query Tip is incredibly helpful and got me to the solution.  Thank you very much.
0
 
LVL 1

Expert Comment

by:gmartinnc
ID: 35190601
Hmmm.  seems to me I just said that.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

840 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