Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2003 Select Distinct in Append Query

Posted on 2004-08-16
1
Medium Priority
?
582 Views
Last Modified: 2012-08-13
I am appending table 'A' to table 'B'. Both tables have a very simular structure.  The group of fields last,first & init have a unique value.  If this unique group is not present in table 'B' these fields, along with several other non-unique fields,  should be added to table 'B'.

My question is how do I limit Select Distinct so the other fields which are part of the same record are also updated?

Example:

Insert into Master (Last,first... )
Select Distinct Daily1.last,Daily1.first   ...
                     [plus other fields (address,city,state) ]
From Daily1

Thanks,

David
0
Comment
Question by:DavidDF1913
[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
1 Comment
 
LVL 9

Accepted Solution

by:
samopal earned 1000 total points
ID: 11813308
Insert into Master (Last,first... )
Select Distinct Daily1.last,Daily1.first   ...
                     [plus other fields (address,city,state) ]
From Daily1
Where NOT EXISTS (
  Select * From Master Where Master.Last=Daily1.Last and Master.First=Daily1.First and ...
)

D'Al
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

721 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