Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan and Update with 2 cursors
Message
From
26/08/2008 16:03:31
 
 
To
14/08/2008 16:31:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01338981
Message ID:
01341977
Views:
12
>>Hi All,
>>
>>I have a program, where I collect info into 1 cursor (fstcursor), then use that cursor to update a different cursor (mncursor). At the moment, I have to do a scan of fstcursor, and update mncursor within that scan. With 100,000+ records, this takes a while. Is there a better way to do this?
>>
>>I have a lot of these updates in the program, plus some fors. At the moment, the program takes well over 16 minutes to run (still has not finished this run) with 100,000 to 110,000 records.
>>
>>I thought maybe getting rid of scans might help, but I wanted to ask you, UT members, first. :)
>>
>>Thanks,
>>Beth
>
>I don't think there's an SQL option to update the cursors since UPDATE FROM is not in VFP 8.
>
>But 16 minutes seems excessive for that many records. When I have this sort of situation I would usually do something like
>
>SELECT mnCursor
>INDEX ON expression TAG temp
>SELECT fstCursor
>SET RELATION TO expression INTO mnCursor
>REPLACE ALL field WITH fstCusor.field...... FOR FOUND('fstCusror')
>
>Can something like that be adapted to your situation?
Rich,
You had the solution, with a little <g> help from Naomi, I got it working.

Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform