Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for differences...
Message
 
 
To
27/11/2000 16:23:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00445792
Message ID:
00445862
Views:
13
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform