General information
Category:
Coding, syntax & commands
Title:
Slow SQL data extraction
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only