EpmQueryDatasetTimeInterval

<< Click to Display Table of Contents >>

 

EpmQueryDatasetTimeInterval

Returns data from a query with the configuration of pens and aggregation types from the Dataset Server informed in the @datasetName parameter and with a Time Interval-type period defined in the @startTime and @endTime parameters.

 

Syntax

SELECT Name, Timestamp, Quality, Value FROM EpmQueryDatasetTimeInterval(@datasetName, @startTime, @endTime)

 

Parameters

@datasetName: Full name of the Dataset Server to query, which must be between single quotes

@startTime: Initial date of the period to query. Users must use a String in the format yyyy-MM-dd HH:mm:ss

@endTime: Final date of the period to query. Users must use a String in the format yyyy-MM-dd HH:mm:ss

 

Resulting Fields

Name: Name of the variable or variables queried

Timestamp: Timestamp of data found

Quality: Quality of data found

Value: Value of data found

 

Usage Example

To return a table with configurations of pens and aggregation types from Dataset ODBC_Dataset in the period between 10:23 and 10:25 on 12/17/2020, use the next declaration. The RandomTags_Random1 pen's type is Raw and the RandomTags_Random10 pen's type is Interpolative with a 30-second interval.

SELECT Name, Timestamp, Quality, Value FROM EpmQueryDatasetTimeInterval('ODBC_Dataset', '2020-12-17 10:23:00', '2020-12-17 10:25:00')

Was this page useful?