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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding duplicate data amongst multiple tables

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have two tables that have the same table layout. One of which is a TEMP table and one which is the ORIG table. I don't want to insert any records from the TEMP table into the ORIG table until I know for sure that no data is being duplicated. So my question is, How do I find all the records, if any, that are in both tables?
 
Create a UNION query to get all of the records into a single recordset.

Use the query wizzard thingggggggy to find duplicate records in the UNION query.

You may want to add a tag field to each of the tables to ID which table the record came from. This can be done in a pair of 'pre' union query queries whith the tag field just having a const ("Temp" | "Orig") and all other fields for the tables. Then the union query on the two 'pre' union queries. Now the Union query has all of the records from temp and orig. Now do the query wizzard "find duplicates". Process the dups as necessary.



MichaelRed
mred@duvallgroup.com
There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top