RECALL Command

Unmarks records marked for deletion in the selected table.

RECALL [Scope] [FOR lExpression1] [WHILE lExpression2] [NOOPTIMIZE]
   [IN nWorkArea | cTableAlias]

Parameters

  • Scope
    Specifies a range of records to recall. Only the records that fall within the range specified are recalled. The scope clauses are: ALL, NEXT nRecords, RECORD nRecordNumber, and REST. For more information on scope clauses, see the Scope Clauses and Overview of the Language online topics.

    The default scope for RECALL is the current record (NEXT 1).

  • FOR lExpression1
    Specifies that only the records for which lExpression1 evaluates to true (.T.) are recalled. This option allows you to filter out undesired records.

    Rushmore optimizes a RECALL FOR if lExpression1 is an optimizable expression. For best performance, use an optimizable expression in the FOR clause.

    For more information, see SET OPTIMIZE and Using Rushmore to Speed Data Access.

  • WHILE lExpression2
    Specifies a condition whereby records are recalled for as long as lExpression2 evaluates to true (.T.).

  • NOOPTIMIZE
    Prevents Rushmore optimization of RECALL

    For more information, see SET OPTIMIZE and Using Rushmore to Speed Data Access.

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

Remarks

You can use RECALL to recover records, provided you have not issued PACK or ZAP.

Caution   Once a file has been packed, all records marked for deletion are gone forever.

You can mark records for deletion by issuing DELETE or DELETE – SQL, or by choosing Delete Records from the Table menu when a Browse or Edit window is active. You can recall records by issuing RECALL, or by choosing Recall Records from the Record menu when a Browse or Edit window is active.

If you omit the IN clause, the RECALL command operates in the current work area.

Example

The following example opens the customer table in the testdata database. DELETE – SQL is used to mark all records for deletion where the country field contains USA. All the records marked for deletion are displayed. RECALL ALL is used to unmark all the records marked for deletion.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'data\testdata')
USE customer  && Opens Customer table

DELETE FROM customer WHERE country = 'USA'  && Mark for deletion
CLEAR
LIST FIELDS company, country FOR DELETED( ) && List marked records
RECALL ALL  && Unmark all records marked for deletion

See Also

DELETE | DELETE – SQL | PACK | SET DELETED | ZAP