STS_HasNoData function
The STS_HasNoData function indicates whether the object is missing data for a specified time range.
Syntax
STS_HasNoData(
ts TimeSeries,
begin_time DATETIME YEAR TO FRACTION(5),
end_time DATETIME YEAR TO FRACTION(5))
returns Boolean
- ts
- The name of the time series.
- begin_time
- The start of the time range. NULL indicates the time stamp of the first element in the time series.
- end_time
- The end of the time range. NULL indicates the time stamp of the last element in the time series.
Usage
Run the STS_HasNoData function to find out whether an object is missing data for the entire time range. The missing data can be caused by either a no signal condition and an interrupted signal condition.
Returns
t
= The object has no data for the time range.
f
= The object has data for the time range.
An exception = An error.
Example
The following query returns whether any vehicle is missing data between the times 2014-06-07 20:52:53.00000 and 2014-06-10 16:49:36.00000:
SELECT modid, STS_HasNoData(ts_track,
'2014-06-07 20:52:53.00000', '2014-06-10 16:49:36.00000')
FROM t_vehicle;
modid (expression)
1001 t
1002 f
2 row(s) retrieved.
Vehicle 1001 does have a period with no data.