Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Historian

Create a direct query

  • Last UpdatedJan 31, 2025
  • 2 minute read

You can either type in a SQL query (if you know SQL syntax) or use the query builder to create a query. The results are output to the workbook.

To perform a direct query:

  1. On the Historian tab, in the Tag Management group, click Direct Query. The Direct Query dialog box appears.

  2. In the Servers list, click the name of the server to use. For more information about this list, see Create a new AVEVA Historian Server connection and Server Connection Configuration.

  3. In the Query window, type the SQL query to execute against the database.

  4. You can also click the query button to start the Query client tool. You can use the Query client to build a query, which is inserted into the Query window. For more information, see AVEVA Historian Client Query.

  5. In Select StartDate, EndDate, specify the workbook cells that show the start date and end date to use in this query.

  6. Optionally, in Select TagName, specify the workbook cell or range of cells that show the tagname(s) to use in this query.

  7. Select the Enter the results as an array-formula check box to insert the results as an array formula. An array formula can perform one or more calculations and then return either single result or multiple results. An array formula allows for the resending of the query, since the query parameters are included in the cells that contain the query results. For more information, see Working with Functions, Formulas, and Cells.

  8. Select the Specify format options (select cells) check box to specify a range of cells that contain formatting information. The formatting information in the cells will be applied to the query results. For more information, see Selecting Cells.

  9. In the Select cell for output list, specify the location of the worksheet cell(s) that will contain the output. Click on the button to select the cell(s) using your mouse. For more information, see Selecting Cells.

  10. Click OK.

  11. To edit the query, click in the cell that contains the red triangle.

Related Links
TitleResults for “How to create a CRG?”Also Available in