INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

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!

E-mail*
Handle

Password
Verify P'word
*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
Partner Button
(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

sgunthor (Programmer)
12 Dec 00 15:32
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?
MichaelRed (Programmer)
12 Dec 00 15:45
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

Start A New Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Promoting, selling, recruiting and student posting
are not allowed in the forums.
Posting Policies

LINK TO THIS FORUM!
(Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum)
TITLE: Microsoft: Access Queries and JET SQL Forum at Tek-Tips
URL: http://www.tek-tips.com/threadminder.cfm?pid=701
DESCRIPTION: Microsoft: Access Queries and JET SQL technical support forum and mutual help system for computer professionals. Selling and recruiting forbidden.