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


Chapter 3 Tools : DELETE_DATA

DELETE_DATA
Deletes the data from a table or table instance. (C)
Invocation
CALL DELETE_DATA(tablespec, select, location)
 
Usage Notes
If the table specified in tablespec is parameterized, you specify only the data parameters, not the location parameter.
If you specify an empty string for select, all occurrences are deleted from the table and table instance.
The syntax for select is <field name> <relational operator> <value>.
Specify a value for location only if the data is located on a different node.

Exceptions
 
In both cases the exception should be handled by the calling rule. More information describing the circumstances of the failure is available in the @OBJECTMSG.MSG field.
Example
The following rule deletes selected occurrences from the table ­EMPLOYEES_REMOTE. The rule is accessing local data.

 
RULE EDITOR ===> SCROLL: P
DELETE_DATA_1;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ CALL DELETE_DATA('EMPLOYEES_REMOTE(CANADA)', 'MGR#=79912', | 1
_ ''); |
_ ---------------------------------------------------------------------------

 
The following rule deletes all occurrences of the DEPTS table, which is parameterized by region:

 
RULE EDITOR ===> SCROLL: P
DELETE_DEPTS;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ FORALL $DEPTS : | 1
_ CALL DELETE_DATA('DEPTS(' || $DEPTS.REGION ||')', '', |
_ ''); |
_ END; |
_ ---------------------------------------------------------------------------

 

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