UPDATE-SQL locks and unlocks each row it updates and even some rows it doesn't update. Because of that it'll be always slower than REPLACE FOR that lock the table. To see if lock slows the UPDATE, try to FLOCK the table before UPDATE .
>
>I have just recently learned of UPDATE-SQL and am now trying to use it. There's something I have missed, however, because the following executes really slow ... a minute or more to execute!
>
Update KitDetail Set ;
> ReceivFlag = .T. ;
> From c_TransferDetail ;
> Where c_TransferDetail.Received ;
> And c_TransferDetail.NonInvID = KitDetail.UniqueKey ;
> And KitDetail.UniqueKey # 0
>KitDetail is table indexed by UniqueKey.
>c_TransferDetail is a cursor with maybe 20 to 50 records in it.\
>
>Previously, I handled this with SET RELATION into KitDetail, and it completed essentially instantly.
>
>OK, so what am I missing here?
>
>Thanks so much in advance,
--sb--