Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 6 Manipulating Data in a Table : Deleting Data

Deleting Data
Deleting Data Using the D Line Command in the Table Editor
Using the D line command, you can delete multiple occurrences. To use the D line command, complete the following tasks:
1.
2.
The occurrences is deleted.
Deleting Data Using PF16 in the Table Editor
You can use PF16 to delete one occurrence (where the cursor is positioned) at a time. To use PF16, complete the following tasks:
1.
2.
The occurrence is deleted.
Deleting Data Using the Single Occurrence Editor
From the Single Occurrence Editor you have two options for deleting the occurrence:
The DELETE primary command
To use either method, complete the following tasks:
1.
2.
If you decide to cancel the deletion, use any PF key other than PF22. When the deletion is completed the screen re-appears with the updated table.
Deleting Data Using a Rules Statement
To delete data with a rules statement, use the DELETE statement. This statement requires the primary key to be available, either via a previous GET or FORALL on the table, or by explicit selection of the primary key.
You can use the WHERE clause and the primary key value to specify which occurrence to delete (that is, WHERE primary key value =).
Example of Deleting Data
The following rule deletes a manager from the MANAGER table:

 
RULE EDITOR ===> SCROLL: P
DELETE_MANAGER(mgr#);
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ DELETE MANAGER WHERE MANAGER_NUM = MGR#; | 1
_ ---------------------------------------------------------------------------

 
Deleting Data Using a Workbench Option
To delete data using the workbench, use the CL clear table option. To use this option, complete the following tasks:
1.
2.
A prompt screen appears.
3.
For example, to delete data from the MIDWEST region of the @EMPLOYEES table, type: @EMPLOYEES(MIDWEST).
4.
For example, to delete the occurrence for employee 22312, type: EMPNO=22312
5.
Alternative Method to Delete Data
Alternatively, you can use the CL clear table option as follows:
1.
2.
For example, to delete data from the MIDWEST region of the @EMPLOYEES table, type: @EMPLOYEES(MIDWEST),
3.
Deleting Data Using a Shareable Tool
A number of shareable tools are available for you to delete data from a table. Use the tools as follows:
To delete data at either a local or remote location, use DELETE_DATA. You can selectively delete data using this tool.
To delete data locally, use $CLRTAB. You can do only a selection on parameter values using this tool.
See Also
TIBCO Object Service Broker Shareable Tools for information on the tools.
TIBCO Object Service Broker Programming in Rules for information about the use of rules and the DELETE statement.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved