select TsToList(stock_data, 1)::list(smallfloat not null) from daily_stocks;

select TsToList(stock_data, 0)::list(datetime year to fraction(5) not null) from daily_stocks;

select Interp(stock_data) from daily_stocks;

begin work;

create row type day_info (
    ValueDate          DATETIME year to fraction(5),
    carryover          char(1),
    spread             integer,
    pricing_bmk_id     integer,
    price              float,
    yield              float,
    priority           char(1)
);

execute procedure TSContainerCreate('ctnr_daily', 'rootdbs', 'day_info', 0, 0);

create table corporates (
    Secid	integer UNIQUE,
    series	TimeSeries(day_info)
);

insert into corporates values (
	25000006,
	'container(ctnr_daily), origin(1994-01-03 00:00:00.00000), calendar(daycal), threshold(0)');

select * from corporates;

execute procedure TSIncLoad('corporates',
			    '$USERFUNCDIR/daily.dat',
                            'daycal',
                            '2011-01-03',
                            0,
                            't',
                            'ctnr_daily',
			    1);

select * from corporates;

rollback work;
