SET FIELDS Command

See Also

Specifies which fields in a table can be accessed.

Syntax

SET FIELDS ON | OFF | LOCAL | GLOBAL

-or-

SET FIELDS TO [[FieldName1 [, FieldName2 ...]]
  | ALL [LIKE Skeleton | EXCEPT Skeleton]]

Arguments

ON

Specifies that only the fields in the field list can be accessed.

OFF

(Default) Specifies that all the fields in the current table can be accessed.

LOCAL

Specifies that only the fields in the current work area listed in the fields list can be accessed.

GLOBAL

Specifies that all fields in the field list, including fields in other work areas, can be accessed.

SET FIELDS GLOBAL lets you access fields in other work areas without issuing SET COMPATIBLE TO DB4.

TO [FieldName1 [, FieldName2 ...]]

Specifies the names of fields that can be accessed in the current table. You must include an alias with the field name in the following cases:

ALL

Allows access to all the fields in the current table.

ALL LIKE Skeleton | EXCEPT Skeleton

You can selectively access fields by including the LIKE or EXCEPT clause or both. If you include LIKE Skeleton, you can access fields that match Skeleton. If you include EXCEPT Skeleton, you can access all fields except those that match Skeleton.

The skeleton Skeleton supports wildcards such as * and ?. For example, to access fields that begin with the letters A and P, issue the following:

SET FIELDS TO ALL LIKE A*,P*

The LIKE clause can be combined with the EXCEPT clause:

SET FIELDS TO ALL LIKE A*,P* EXCEPT PARTNO*

Remarks

SET FIELDS TO is additive — issuing SET FIELDS TO with a field list adds the specified fields to those that are currently accessible.

Issuing SET FIELDS TO implicitly performs SET FIELDS ON. Issuing SET FIELDS TO without any additional arguments implicitly performs SET FIELDS OFF. Issue SET FIELDS TO without including either a field list or ALL to remove all fields from the field list for the current table.

SET FIELDS is scoped to the current data session.