Table of Contents

Search

  1. Preface
  2. Function reference
  3. Constants
  4. Operators
  5. Dates
  6. Functions
  7. System variables
  8. Datatype reference

Function Reference

Function Reference

LAST

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
tasks.

Syntax

LAST(
value
[,
filter_condition
] )
Argument
Required/
Optional
Description
value
Required
Any data type 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

0 COMMENTS

We’d like to hear from you!