There is a 1 to 1 relation between the table and the cursor and the cursor consists of a set of records with unique pk.
So I need to step the cursor record by record in order to know which record in the table to update.
>You do not need SCAN and ENDSCAN. The WHERE clause will update all matching records in the table. Use SCAN and ENDSCAN when you need to process records 1 at a time. SCAN/ENDSCAN is the same as DO WHILE NOT EOF(), SKIP, ENDDO without the need for the SKIP command.
>
>>I did like this:
>>
>>SELECT 'CURSOR'
>>SCAN
>> UPDATE 'TABLE' SET 'FIELD' = 'VALUE' WHERE 'PK_TABLE' = 'CURSOR.PK_CURSOR'
>>ENDSCAN
>>
>>This is really fast takes only a few secs to complete.
>>
>>>I'm gonna try the standalone IDX and if that doesn't help I'm gonna use the good old SCAN. Thanks for the help.
>>>
>>>>Did you try both a standalone IDX and then a CDX tag? If that didn't help, then you may want to use good old DML stuff like:
>>>>
>>>>SELECT cursor
>>>>SCAN
>>>> SELECT table
>>>> SEEK cursor.pk_field
>>>> REPLACE table.field WITH "whatever"
>>>> SELECT cursor
>>>>ENDSCAN
>>>>
>>>>>It didn't help at all it still takes about 15 mins to complete the UPDATE.
>>>>>This shouldn't take that long? Perhaps the problem is the SUB SELECT?
Magnus NordinVFP MCP
"We have tested the GUI on 5-year olds. Why? Beacuse they aren't braindead!"
Michael Spindler, Apple