The ts_nth_elem() function
The ts_nth_elem() function returns the element at the nth position of the given time series.
Syntax
ts_tselem
ts_nth_elem(ts_tsdesc *tsdesc,
mi_integer N,
mi_integer *STATUS)
- tsdesc
- The descriptor returned by ts_open().
- N
- The time series offset or position to read the element from. This value must not be less than 0.
- STATUS
- A pointer to an mi_integer value that is set on return
to indicate whether the element is
NULL
. See The ts_hide_elem() function for a description of STATUS.
Description
The equivalent SQL function is GetNthElem.
Returns
The element at the nth position
of the given time series, and whether it was NULL
.
This value must not be freed by the caller. It is overwritten after
two fetch calls.