Finding Dupes & Putting to File

  • Thread starter Thread starter Always Learning
  • Start date Start date
A

Always Learning

Hi Guys,

I need your help again!

I have two files with exactly the same layout
CustId : Number
FirstName : Text
CustEmail : Text

I need to get all the records from table1 that do not have a match in table2
(Using CustEmail).
Any matches that are found I need to put into a new table called table3 and
remove the Recs from table1 so that it contains no matches.

Hope that all makes sense.

Thanks in advance for your help.

Best Regards,

Steve Wilson.
 
Steve,

This kind of operations is done through action queries (make-table,
append, update, delete - depending on the action desired) and the trick
is to use sub-queries. So, for instance, in order to filetr table1
records that also appear in table2, using field CustEmail for matching
records, you would start by making a query on table1 with the following
criterion under field CustEmail:
In (SELECT CustEmail FROM table2)

Similarly, to filter the records with no match, the criterion would be:
Not In (SELECT CustEmail FROM table2)

I hope this gives you the idea.
Nikos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top