LAST
Returns the last row in the selected field. Optionally, you can apply a filter to limit the rows read. You can nest only one other aggregate function within LAST.
Use only in Mapping Configuration tasks.
Syntax
LAST( value [, filter_condition ] )
Argument | Required/ Optional | Description |
---|
value | Required | Any datatype except Binary. Passes the values for which you want to return the last row. You can enter any valid transformation expression. |
filter_condition | Optional | Limits the rows in the search. The filter condition must be a numeric value or evaluate to TRUE, FALSE, or NULL. You can enter any valid transformation expression. |
Return Value
Last row in a field.
NULL if all values passed to the function are NULL, or if no rows are selected (for example, the filter condition evaluates to FALSE or NULL for all rows).
Example
The following expression returns the last row in the ITEMS_NAME field with a price greater than $10.00:
LAST( ITEM_NAME, ITEM_PRICE > 10 )
ITEM_NAME | ITEM_PRICE |
---|
Flashlight | 35.00 |
Navigation Compass | 8.05 |
Regulator System | 150.00 |
Flashlight | 29.00 |
Depth/Pressure Gauge | 88.00 |
Vest | 31.00 |
RETURN VALUE:Vest | |