InsSet function
The InsSet function inserts every element of a specified set into a time series.
Syntax
InsSet(ts TimeSeries,
multiset_rows multiset,
flags integer default 0)
returns TimeSeries;
- ts
- The time series to act on.
- multiset_rows
- The multiset of new row type values to store in the time series.
- flags
- Valid values for the flags argument are described
in The flags argument values. The default
is
0
.
Description
The supplied row type values must have a time stamp as their first attribute. This time stamp is used to determine where in the time series the insertions are to be performed. For example, to insert into a time series that stores a single double-precision value, the row type values passed to InsSet would have to contain a time stamp and a double-precision value.
If there is already an element at the specified timepoint, the entire insertion is void, and an error is raised.
You cannot insert an element at a time stamp that has been hidden.
Returns
The time series with the multiset inserted.
Example
The following example inserts a
set of stock_trade items into a time series:
update activity_stocks
set activity_data = (select InsSet(activity_data, set_data)
from activity_load_tab where stock_id = 600)
where stock_id = 600;