Appending a table by adding only records who are not duplicates

A

Adam-Network Admin

I am designing a database program for a Fantasy hockey league. table A gets
Players current stats from an excel spredsheet it is linked to. Table B is
to be updated with the current stats. Now updating existing records I have
no issues with. If a player is new or added, I need him to also be added to
table B. Here is the kicker, Table B has one more column for status (Free
Agent, or what team owns that player). I don't want this information to
change. I have tried to use an append query but that way not only adds the
new guy to table B, it adds every other guy again. A make table query would
be perfect, but it will eliminate that additional status column. Is there a
way to get an append query to do more of a differential append that will
append only those players that are currently not on Table B?

Thanks
Adam
 
J

Jeff Boyce

Isn't this essentially the same as your other post? Why post the same issue
in two different newsgroups?

This causes you more work, since you have to look in all the places you
posted to see if you have any response.

This causes us (volunteers) more work, since we don't know that someone else
already addressed your issue in another newsgroup.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or psuedocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
D

Daryl S

If you have a key value (PlayerID, or PlayerName, etc.) that is common to
both tables, then you have two options. If you make this key value the
primary key to the table, then only 'new' players will be added - the others
will fail. The other option is to update your append query so that there is
a criteria on the identifying value like the following (assuming PlayerID is
the identifying field in both tables):

Not in (select [PlayerID] from [TableB])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top