INTELLIGENT WORK FORUMS FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a Computer / IT professional? Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
Favorite Forums
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site

(Download This Button Today!)
Member Feedback
"...You have made an incredible site which is truly a great help to me in solving problems. A tip of my hat to you!..."
Geography
Where in the world do Tek-Tips members come from?
|
finding duplicate data amongst multiple tables
|
|
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.comThere is never time to do it right but there is always time to do it over |
|
|
 |
|