Hi Marcia,
another tips is:
Search for a first occurrence of a value, as MyValue, is very frequently.
Standard VFP command is:
SELECT MyTable
LOCATE FOR MyField=MyValue
IF FOUND()
...
ENDIF
This need set workarea, and Rushmore optimization is not very good,
besides, if MyValue is a variable/field, FOR clause read MyValue for each comparison.
=LOOKUP(MyTable.MyField,MyValue,MyTable.MyField)
IF !EOF('MyTable')
...
ENDIF
is faster: double faster if no index exist, exponential faster if index exist.
Attention is need if MyTable have a index active.
Fabio
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only