Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow SQL data extraction
Message
 
 
À
26/07/2001 05:30:44
Denis Filer
University of Oxford
Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00535574
Message ID:
00535606
Vues:
12
select file2.* from file2  ;
    join file1 on file2.keycode = file1.keycode ;
    into table (cMyextract)
>I have a problem with slow data extraction using SQL. I want to extract records from 'file2' that have codes that match those in 'file1'.
>
>* open a file to extract data from.
>use file2 in 0 alias file2
>
>* this is where the data will go.
>cMyextract = "extract.dbf"
>
>* create an array of key codes from another file (file1) - store in an array
>select distinct keycode from file1 into array myfilecodes
>
>if _tally <> 0
> select * from file2 into DBF &cMyextract where ascan(myfilecodes,keycode) > 0
> use
>endif
>
>I am no expert with SQL. Setting an index on the files doesnt seem to help.
>Especially slow on networks. THANKS!
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform