Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for differences...
Message
 
 
À
27/11/2000 16:23:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00445792
Message ID:
00445862
Vues:
19
>>>I have two tables with identical structures and record counts. I need a quick way to extract the different rows from either table into a cursor or table. The differences might be a single field or more. Both tables have an integer PK and are in sync. Any thoughts? TIA
If your tables are small(ish) you might get away by doing :
SELECT * FROM TableOne ;
>>UNION ;
>>SELECT * FROM TableTwo
If your new RecCount() is the same as either of your source tables then the tables are identical. If the RecCount() has increased then you have rows with differences. All you need to do is select those rows with the same primary key. This assumes that the primary key has not changed - only the (other) data.
>

>This is what I was looking for - a one liner! Tables are around 8k records, I am guessing 40-50 rows out of whack. This should make it easy to work with. Thanks much, Houston.
Your welcome.
censored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform