PARTITION
The PARTITION function checks to see if an occurrence of an object belongs to a certain partition. If the object is that partition, "true" is returned. Otherwise, "false" is returned.
- Syntax:
- PARTITION (single-object-expression, single-simple-object-name)
- Meaning:
- PARTITION (partitioned_object, simple_name_of_partition_to_check_for)
- Returns:
- "True" or "false"
PARTITION returns "true" if the data object of partitioned_object belongs to the partition represented by simple_name_of_partition_to_check_for. Otherwise, PARTITION returns "false".
Examples
- Assume that Transaction has been partitioned
into three partitioned subtypes: Invoice, Order, and Remittance,
as shown.
The following rule could be used to detect whether a given Transaction is an Invoice:
PARTITION (Transaction:.:Batch, Invoice)
If the Transaction is an Invoice, PARTITION returns "true". If the Transaction is not an Invoice (for example, it is an Order or a Remittance), PARTITION returns "false" for that Transaction.
Related function
- GETPARTITIONNAME