4 Modifying the Database
DELETE item list
The item list is a list of data items to be deleted. All data items must be in the same data set. When a data item is deleted, its value is changed to null character(s). If all the data items in a data set are specified in the item list, the entire data entry is deleted; the values of the data items are not simply changed to nulls.
For example, assume the ORDER_NO 25 was cancelled. The following shows how the entry is deleted from the database:
FIND CUSTOMER FOR CUSTOMER.ORDER_NO="25" ** 1 entry found DELETE CUSTOMER FIND OPTION FOR OPTION.ORDER_NO="25" ** 1 entry found DELETE OPTION
NOTE: If one of the entries in a list cannot be deleted, Query issues an error message; it then goes to the next entry and continues deleting.
The entries in a manual master data set are deleted in the same manner as deleting an entry from a detail data set. To delete a key item from a manual master data set you must first delete all entries in associated detail data sets that have the same key item value as that of the manual master you wish to delete.
Entries are deleted from an automatic master data set for you.