SetContainerName function
The SetContainerName function sets the container name for a time series, even if the time series already has a container name.
Syntax
SetContainerName(ts TimeSeries,
container_name varchar(128,1))
returns TimeSeries;
- ts
- The time series to act on.
- container_name
- The name of the container.
Description
If a time series is stored in a container, you can use the SetContainerName function to copy the time series from one container to another. The time series is copied to the container that you specify with the container_name parameter. The original time series is unaffected.
Returns
A time series with a new container set.
Example
The following example creates the container tsirr and sets a time series to
it:
execute procedure TSContainerCreate('tsirr', 'rootdbs',
'stock_bar_union', 0, 0);
select SetContainerName(Union(s1.stock_data,
s2.stock_data)::TimeSeries(stock_bar_union),
'tsirr')
from daily_stocks s1, daily_stocks s2
where s1.stock_name = 'HCLTECH' and s2.stock_name = 'AA02';