Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow SQL data extraction
Message
 
 
To
26/07/2001 05:30:44
Denis Filer
University of Oxford
United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00535574
Message ID:
00535606
Views:
13
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform