Build a SQL query
- Last UpdatedNov 06, 2025
- 3 minute read
The following procedure describes how to build your SQL query in the SQL Query Editor window:
-
Select a value from the Reserved Criteria Name dropdown.

-
Modify the SQL query.

-
In the Field Name section, perform the following:
-
In the Name field, enter the name of the SQL query.
-
In the StartDateTime field, enter the start date and time.
-
In the EndDateTime field, enter the end date and time.

-
-
To run the query, select Tools, then select Run SQL.

The Results window appears with the SQL query results.

You can execute the SQL statement and AVEVA Production Accounting will indicate a success or failure.
Create a SQL query
There are three methods to create your SQL query.
-
You can type the query into the grid cell.
-
To the right of the Query SQL column, there is a narrow column that contains an implicit button for every row of the grid to invoke a SQL Query Editor. This dialog contains a Reserved Criteria Names combo box that lets you quickly select certain fields that are commonly used in WHERE clauses and quickly insert them into your SQL statement.
-
From within the SQL Query Editor, choose the Tools > Build SQL menu item, which lets you build your query with a point and click method. The tool is known as the Build Interface SQL tool. A restriction when using the tool is that you cannot use the reserved criteria names.

Exit the SQL Query Editor dialog by clicking the OK button, which returns focus to the Edit Interface Information dialog box.

If you use remote control interface, you can set the command in Command Editor.
First, the interface source shall be defined in Option dialog box to establish these interfaces as shown below.

And then the interface can be added in Edit Interface Information dialog box.
And the command is defined in SQL Command Editor dialog box as shown below.

The above command example is to run AVEVA Production Accounting program on the remote system.