Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing
Message
 
To
25/06/2001 16:48:38
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00523261
Message ID:
00523297
Views:
9
>I need to compare every field between two tables to determine if the records are duplicates of one another. CAn anyone assist me in this?

The optimal solution depends on what end result you need and the nature of the data.
SELECT * ;
  FROM Table1 ;
  UNION SELECT * ;
  FROM Table2
If the structure of the two tables is the same, this code will result in a third table containing only the unique records (duplicates automatically removed by UNION). It's appropriate for some situations and extremely poor for others.

These questions will help decide the best solution:

1. Is either table part of a database?
2. Is one table much larger than the other?
3. What do you intend to do with the duplicates?
4. How many fields are there?
Brien R. Givens

Brampwood Systems
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform