SEEK command

Used to search an indexed field for an exact match for a specified character expression.

Syntax

SEEK search_expression

Parameters

search_expression

Specifies the character expression to search for. The parameter can be specified as a quoted string, variable, or as any valid character expression.

Remarks

In order to use the SEEK command, the table you are searching must be indexed on at least one character field in ascending order. If multiple character fields are sorted in ascending order, only the first field specified in the index is searched. The command does not operate on non-character type index fields, or character type index fields that are sorted in descending order.

Use the SEEK command to move directly to the first record in an indexed table containing a specified search expression.

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

Example

The following example uses the SEEK command to find the first instance of a string in a credit card number field that is a Character field and has been indexed.

OPEN Corp_Credit_Cards
INDEX ON CARDNUM TO “cc_num” OPEN
SET INDEX TO “cc_num”
SEEK “8590122”


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