BIND
Description
BIND
pulls a column or constant to a specified table. In case of a column, this requires that the owner table of the column and the specified target table have a direct or indirect 1:N relationship.
Syntax
BIND( target_table, value)
target_table: The target table which the value should be pulled up to.
value: A column or constant that should be pulled to the target_table.
Usage in PU-functions
BIND
introduces the join between the specified source table column and the target table. This can be helpful in PU-functions, for example, where it enables to aggregate from the source table column to the target table in a 1:N:1 relationship:
In order to aggregate from the source table to the target table, we first need to bind the source table column to the intermediate table using BIND. The resulting column can then be aggregated to the target table using a PU-function.
If the target_table
is the owner of column
, column
is returned unmodified.
Examples
[1] 1:n relationship between caseTable and OrderPos, 1:n relationship between productTable and OrderPos. We want to find the price of the most expensive product in an order (case). PU_MAX cannot pull directly from the productTable to the caseTable, so we use BIND to pull the price column to the OrderPos table. | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
[2] Pull up a constant to a table. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
|