FIND command

Used to search an indexed field for an exact match for a specified character or set of characters.

Syntax

FIND search_value

Parameters

search_value

Specifies the literal character or characters to find. The search_value parameter is case-sensitive, cannot include leading spaces, and must not be enclosed in quotation marks. The value specified can be shorter than the values in the field you are searching in.

Remarks

Before you can use the FIND command, you need to index the table you are searching on at least one Character field in ascending order. The FIND command cannot be used to search Numeric, Datetime, or Logical fields, or Character fields that are indexed in descending order.

If the value of the search_value parameter is shorter than the field you are searching, the FIND command compares the parameter to the index field up to the length of the parameter. For example, if the search_value is three characters, the FIND command will try to identify the first record that starts with the three specified characters.

The FIND command produces one of three results, depending on whether a match is found in the table:

The results of the FIND command are not affected if the Exact Character Comparisons option is turned on.

Example

The following example locates the first record that starts with “8590124” in the CARDNUM column, which has been defined as a Character field and indexed in ascending order.

OPEN CC_Analysis
INDEX ON CARDNUM TO "CardNum" OPEN
FIND 8590124


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback