To create a complex index for a dBASE table,

  1. With the table open in the Table designer, choose Structure|Manage Indexes. The Manage Indexes dialog box appears.

Key expressions

The following table shows several examples of key expressions and the fields used.

Key expression

Fields used

Notes

CUSTOMER_N

CUSTOMER_N

 

CUSTOMER_N + ORDER_NO

CUSTOMER_N, ORDER_NO

 

CUSTOMER_N + DTOS(SALE_DATE)

CUSTOMER_N, SALE_DATE

DTOS converts date field to character for indexing.

UPPER(LAST_NAME)+UPPER(FIRST_NAME)

LAST_NAME, FIRST_NAME

UPPER changes character field to all caps.

The first example uses a single field as the key expression. Complex indexes, on the other hand, can use a combination of one or more fields, plus functions and operators.

CUSTOMER_N + ORDER_NO is a complex key expression using multiple fields and the concatenation operator (+).

CUSTOMER_N + DTOS(SALE_DATE) is a complex key expression consisting of multiple field names and a function.

UPPER(LAST_NAME)+UPPER(FIRST_NAME) converts characters to all caps before concatenating them. The UPPER function prevents sorting problems when capitalized entries are mixed in with lowercase ones.