Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>>>Hi,
>>>
>>>LOCATE FOR Command Scans for records from Top to Bottom by defauld
>>>
>>>Is it possible to Locate records in reverse Direction. If yes, kindly Guide how to do this. If not, what's the alternative, if I have ample number of records.
>>>
>>>Regards
>>>Harsh
>>
>>It might be very slow this way.
>>INDEX ON 'A' TAG XATAG
>>SET ORDER TO XATAG DESCENDING
>>LOCATE FOR ...
>>
>>
>>What sequence do you really need? The sequence should be based on fields in the table, not record #. With such fields, you can SET ORDER TO sequence ASC/DESC, SEEK(), SCAN WHILE. Allowing you to process not only the entire set, but also subsets very fast.
>
>Personally I wonder why anyone still uses LOCATE at all. Pretty prehistoric.
Not prehistoric in the least. Rushmore in VFP-SQL is identical to LOCATE.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement