Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible?

Status
Not open for further replies.

Ascentient

IS-IT--Management
Nov 4, 2002
267
I want to use an append query to compare to identical tables and then append the "new" records to the "first" table.

I assume I will have to create a select query and then run my append from it, but I am not sure how to start.

Thoughts or suggestions would be appreciated.
 
If you link the two tables in an append query and test for null, you should be able to append the missing records.

Kind of like, put table1 and table2 in an append query. Set to append to Table1. Join the tables on matching fields using a show all records from Table2 and all matching records from table1. Then add all of table2 fields to the query. Also add one field from table1 that should not be null, and test to see if it is null.

The table1 null test will determine the record isn't there and the append will add it from table2.
Good Luck
 
Thanks Stix4t2 that worked. I almost posted that it was not working, but I found I was checking for Not Null instead of Null.

Thanks again.
Ascent
 
Let me ask this.
For those same tables would it be possible to compare each record and if any field in tblnew was different than any field in tblProduct then update tblproduct with the "changes" in tblnew?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top