Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Improving sluggish SQL
Message
De
20/12/1999 13:14:01
 
 
À
20/12/1999 13:02:14
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00306158
Message ID:
00306278
Vues:
34
>Bruce,
>
>>I have some very large tables from which I have to get records NOT IN other very large tables. Code like this:
>
>>select * from table1;
>>where keyfield NOT IN;
>>(select keyfield from table2)
>
>how about
>
>USE TABLE1
>USE TABLE2 ORDER TAG keyfieldTag

This needs an IN 0 clause at a minimum. Geez, if you're gonna post bad xBASE, at least make the bad xBASE code workable and correct. As posted, only TABLE2 is open - you've gone and USEd it in the same workarea as TABLE1. The joys of xBASEism...

>
>SET RELATION TO Keyfield INTO Table2
>

In order to activate the relation, you need to shift the record pointer (even if back to itself) so adding a GO TOP or LOCATE here might be appropriate.

>BROWSE NORMAL FOR EOF("Table2")
>

I seriously doubt that Bruce wants to cruise the file in a Browse, but YMMV.

>You might want to copy this into a temp table
>
>COPY TO Temptable EOF("Table2")

Your coding is extremely consistent. You need a FOR just prior to the conditional expression.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform