Share via


SET FILTER Command

Specifies a condition that records in the current table must meet to be accessible.

SET FILTER TO [lExpression] [IN nWorkArea | cTableAlias]

Parameters

  • lExpression
    Specifies the condition that records must satisfy.

    If the current table is indexed on a field or fields specified in lExpression, Visual FoxPro Rushmore technology can optimize queries based on the field or fields.

  • IN nWorkArea | cTableAlias
    Specifies the work area or table alias affected by the SET FILTER command. Use this clause to specify a work area or a table outside the current work area.

Remarks

Once SET FILTER is issued, only the records that satisfy the condition specified by the logical expression lExpression are available in the table. All commands that access the table respect the SET FILTER condition. A separate filter can be set for every open table.

The condition specified by SET FILTER isn't evaluated until the record pointer is moved in the table.

Issuing SET FILTER TO without lExpression turns off the filter for the current table.

SELECT – SQL does not respect the current filter condition.

See Also

FILTER( ) | SELECT – SQL | Working with Table Aliases