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

Click here to load this message in the networking platform