Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 587
  • Last Modified:

Access 2003 Select Distinct in Append Query

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
DavidDF1913
Asked:
DavidDF1913
1 Solution
 
samopalCommented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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