>Could you please post a complete reproducible scenario (with table structures)?
Thanks Naomi, this helped me track down my problem. I created a small .prg that is essentially doing what I was doing in the main data import and found that if I had the table opened, the insert was very slow in VFP9, but not ran fine in VFP6. Does anyone out there know why?
The code to recreate is below. I normally wouldn't have the destination table opened if I was doing the SQL - insert, but I had modified someone else's code, who was previously using the append blank, gather method, and therefore had opened the destination table. When I changed the code to an insert, I didn't comment the line of code to open it. Anyone know why this is a problem? I looked in the hackers guide but didn't find anything.
-Rick
lcInFile = "testout"
lcOutfile = "testin"
USE testin IN 0 ALIAS MyIn
lnTotal = 0
SELECT MyIn
locate
DO WHILE !EOF()
SCATTER MEMVAR
INSERT INTO (lcInfile) FROM memvar
Sele MyIn
SKIP
ENDDO