<< Clique para Mostrar o Sumário >>
EpmQueryDatasetRecent |
Returns data from a query with the configuration of pens and aggregation types from the Dataset Server informed in the @datasetName parameter and a Recent Period-type period defined by the @period and @timeUnit parameters.
SELECT Name, Timestamp, Quality, Value FROM EpmQueryDatasetRecent(@datasetName, @period, @timeUnit)
•@datasetName: Full name of the Dataset Server to query, which must be between single quotes
•@period: Number of time units informed in the @timeUnit parameter in which the query is performed
•@timeUnit: Time unit. Possible values are Second, Minute, Hour, Day, or Month
•Name: Name of the variable or variables queried
•Timestamp: Timestamp of data found
•Quality: Quality of data found
•Value: Value of data found
To return a table based on the configuration of pens and aggregation types from Dataset ODBC_Dataset in a period of the 3 (three) minutes before the time the query was performed, 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 EpmQueryDatasetRecent('ODBC_Dataset', 3, 'Minute')