Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare Tables
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00614962
Message ID:
00615226
Views:
25
Randall,

A faster way to do this:
select tableA.* ;
   from tableA ;
   into cursor missing ;
   where not exists ;
   ( select keyfield from tableB where tableB.keyfield = tableA.keyfield )
NOT IN requires much more work to be done by the SQL engine.

>I just thought about it. This does give me a table with everyrthing that is there but I still will have not idea of what's missing. For example, table A has 100,000 records in it. The result table gomes up with 95,000 matches. How do I know of the 5000 records in table A are missing in table B? I was thinking I could mark them some how. Then I would have a table of what was not in there. Maybe I could change the code to say NOT IN?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform