The ts_put_ts() function

The ts_put_ts() function updates a destination time series with the elements from the source time series.

Syntax

ts_timeseries *
ts_put_ts(ts_tsdesc  *src_tsdesc, 
           ts_tsdesc  *dst_tsdesc, 
           mi_boolean nodups)
src_tsdesc
The source time series descriptor.
dst_tsdesc
The destination time series descriptor.
nodups
Determines whether to overwrite an element in the destination time series if there is an element at the same time stamp in the source time series. This argument is ignored if the destination time series is regular.

Description

The two descriptors must meet the following conditions:
  • The origin of the source time series must be after or equal to that of the destination time series.
  • The two time series must have the same calendar.

If nodups is MI_TRUE, the element from the source time series overwrites the element in the destination time series. For irregular time series, if nodups is MI_FALSE and there is already a value at the existing timepoint, the update is made at the next microsecond after the last element in the given second. If the last microsecond in the second already contains a value, an error is raised.

The equivalent SQL function is PutTimeSeries.

Returns

The time series associated with the destination time series descriptor.