The second one is missing SEEK() to find record in the local cursor. After you add it they will look pretty similar. Assuming that MySQLPTCursor has less records that local cursor, I would expect the second one to be a little bit faster. Depending on the # of records in the cursor, the difference may be negligible.
>>It's hard to say w/o knowing what "Do other stuff" doing. The second one looks cleaner to me.
>
>I have updated them as follows. The other stuff works on local cursors/tables. Thanks for responding.
>
>>>What is more efficient:
>>>
SQL PT dataset (variable no of records but within a range of records)
>>>INDEX on a field
>>>
>>>SELECT local cursor
>>>SCAN
>>> SEEK(in "MySQLPTCursor")
>>> REPLACE in the local cursor
>>>ENDSCAN
>>>
>>>
>>>SELECT local cursor
>>>SCAN
>>> SQL PT single record as needed
>>> REPLACE in the local cursor
>>>ENDSCAN
--sb--