Use SELECT to retrieve data
- Last UpdatedMar 19, 2025
- 1 minute read
The most common AVEVA Historian query is a SELECT statement:
SELECT select_list
FROM table_source
WHERE search_condition
[ GROUP BY group_by_expression ]
[ HAVING search_condition ]
[ ORDER BY order_expression [ ASC | DESC ] ]
A WHERE clause is mandatory when issuing a SELECT query against any extension table except HistoryBlock.
There are four variations for issuing a SELECT statement to the AVEVA Historian OLE DB provider to retrieve history data:
You should use the four-part name or a provider view to specify the extension table, whenever possible. However, there are instances when the OPENQUERY or OPENROWSET function must be used, such as for queries on wide tables.
For general information on creating SQL queries, see your Microsoft SQL Server documentation.