Difference between revisions of "FIND"
Yvonne.milne (Talk | contribs) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Search for a key in the master index file | Search for a key in the master index file | ||
− | |||
==Syntax== | ==Syntax== | ||
FIND <key expression> | FIND <key expression> | ||
− | |||
==See Also== | ==See Also== | ||
− | [[DBXDESCEND()]], [[DESCEND()]], [[DESCENDING()]], [[DTOS()]], [[EOF()]], [[FOUND()]], [[INDEX]], [[LOCATE]], [[LTOS()]], [[SEEK]], [[SEEK()]], [[SET EXACT | + | [[DBXDESCEND()]], [[DESCEND()]], [[DESCENDING()]], [[DTOS()]], [[EOF()]], [[FOUND()]], [[INDEX]], [[LOCATE]], [[LTOS()]], [[SEEK]], [[SEEK()]], [[SET EXACT]], [[STR()]] |
− | + | ||
==Description== | ==Description== | ||
Line 17: | Line 14: | ||
If the DESCEND() function is used to create the index key, it must also be used in the search <key expression>. Tag indexes built with the DESCENDING keyword require the use of the DBXDESCEND() function in the <key expression>. The DESCENDING() function can be used to determine whether a particular tag was built with the DESCENDING keyword. | If the DESCEND() function is used to create the index key, it must also be used in the search <key expression>. Tag indexes built with the DESCENDING keyword require the use of the DBXDESCEND() function in the <key expression>. The DESCENDING() function can be used to determine whether a particular tag was built with the DESCENDING keyword. | ||
− | |||
==Example== | ==Example== | ||
Line 31: | Line 27: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category: | + | [[Category:NoSQL Commands]] |
− | + |
Latest revision as of 12:44, 4 February 2013
Contents
Purpose
Search for a key in the master index file
Syntax
FIND <key expression>
See Also
DBXDESCEND(), DESCEND(), DESCENDING(), DTOS(), EOF(), FOUND(), INDEX, LOCATE, LTOS(), SEEK, SEEK(), SET EXACT, STR()
Description
The FIND command searches for the specified <key expression> in the master index file. If the <key expression> is found, then the FOUND() function will return .T., and the EOF() function will return .F.. If the <key expression> is not found, then the FOUND() function will return .F., and the EOF() function will return .T.. Character expressions used as <key expressions> may include blanks.
The & macro function must be used to substitute the required <key expression> into the quoted string when the <key expression> is contained in a field or variable.
If the DESCEND() function is used to create the index key, it must also be used in the search <key expression>. Tag indexes built with the DESCENDING keyword require the use of the DBXDESCEND() function in the <key expression>. The DESCENDING() function can be used to determine whether a particular tag was built with the DESCENDING keyword.
Example
use patrons index events, name m_find = "OPERA" find &m_find if found() edit else dialog message "Record not found." endif