GetLastNonNull function

The GetLastNonNull function returns the last non-null element on or before the date you specify.

Syntax

GetLastNonNull(ts          TimeSeries, 
              tstamp      datetime year to fraction(5),
              column_name lvarchar default null,
              flags       integer default 0
) 
returns row;
ts
The source time series.
tstamp
The time stamp for the element you specify.
column_name (optional)
If you specify a column using the column_name argument, the GetLastNonNull function returns the last non-null element on or before the specified date that has a non-null value in the specified column.

If you do not specify the column_name argument, the GetLastNonNull function returns the last non-null element on or before the date. It is possible that all the columns except the time stamp could be NULL.

flags
Valid values for the flags argument are described in The flags argument values. The default is 0.

Description

There are no null elements in an irregular time series. Therefore, when you use the GetLastNonNull function on an irregular time series, always specify a column name. If you use the GetLastNonNull function on an irregular time series without specifying a column name, its effect is equivalent to that of the GetLastValid function.

Returns

A non-null element of the time series.