Type
Processing Command


Purpose
The delete records command deletes records in the specified table.

Syntax
delete records in FORMNAME | RELATIONSHIP
[named "UNIQUE RELATIONSHIP NAME" ]
[with ( selection criteria) ] .

Usage
You must end the delete records command with a period (.). When you delete records in the Primary table, the keyword in is omitted (see Example 1).

Example 1
for members with ( highest of
RESERVATIONS DATE < 01/01/99) ;
delete records .
end

This script deletes records in the Primary table (MEMBERS) whose most recent invoice (in the related RESERVATIONS table) is dated prior to January 1st, 1994.
When you delete records in a table other than the Primary table, the keyword in precedes the table name (as shown in Example 2).
Example 2
for MEMBERS ;
delete records in RESERVATIONS named " OUTDATED "
with RESERVATIONS DATE < 01/01/99) .
end

This script deletes records in the related (RESERVATIONS) table that are dated prior to January 1st, 1999.
The named operator is used to assign a unique relationship name to the group of outdated records in the related table.
Note: The delete records command marks records as deleted, but does not physically delete them from disk until the specified table is reorganized. If records are frequently deleted, reorganizing the table will increase performance.