If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Comparing table data and adding differential information
Aappend queries allow you to add entire records to a table from a source.
Delete queries allow you to delete entire records. Update queries allow you to update information on one table from information on another. How would I compare two tables and add just the records to one exist on the other without adding every other record again. For example A has 400 records and B has 399. I want to compare both tables to find the missing record and add it to B to make B 400 records, not 799 records. How is this accomplished? Thank You Adam |
#2
|
|||
|
|||
Comparing table data and adding differential information
this query should work. customize your table/fiels names as appropriate.
INSERT INTO b SELECT a.keyfield from a where keyfield not in (select keyfield from b); Adam-Network Admin wrote: Aappend queries allow you to add entire records to a table from a source. Delete queries allow you to delete entire records. Update queries allow you to update information on one table from information on another. How would I compare two tables and add just the records to one exist on the other without adding every other record again. For example A has 400 records and B has 399. I want to compare both tables to find the missing record and add it to B to make B 400 records, not 799 records. How is this accomplished? Thank You Adam -- Message posted via http://www.accessmonster.com |
#3
|
|||
|
|||
Comparing table data and adding differential information
If your TableB has a unique (i.e., no duplicates) row identifier, and if
TableA uses the same ID number, when Access tries to append records, it refuses to append any record for which the ID already exists. 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. "Adam-Network Admin" wrote in message ... Aappend queries allow you to add entire records to a table from a source. Delete queries allow you to delete entire records. Update queries allow you to update information on one table from information on another. How would I compare two tables and add just the records to one exist on the other without adding every other record again. For example A has 400 records and B has 399. I want to compare both tables to find the missing record and add it to B to make B 400 records, not 799 records. How is this accomplished? Thank You Adam |
Thread Tools | |
Display Modes | |
|
|