Defining a query with Easy SQL (OP)

In an on-premises environment, use this procedure to define the selection criteria for a stand-alone SQL query through Easy SQL. The basic query properties for the query must have been defined. See Defining a query (OP).

The functionality to define and run stand-alone SQL queries is not available in a cloud environment.

To define the selection criteria for a query through Easy SQL, complete these steps:

Step 1. Add table(s)
  1. In the Query Data (ttadv3580m000) session, select the new query and, on the appropriate menu, select Query By Easy SQL.... The Query Table Data (ttadv3181m000) session starts.
  2. Click New and, from the Query Table field, zoom to the Display Tables (ttadv3584m000) session.
  3. Find and select the relevant table, and click Save and Close. The table is added in the Query Table Data (ttadv3181m000) session.
  4. In the Query Table Data (ttadv3181m000) session, press Tab.
  5. To add extra query tables, repeat steps 2, 3, and 4. Then, click Save.

Note

Optionally, you can add related tables through the Query Table Relationships (ttadv3581m000) session. To add related tables, complete the following steps:

  1. In the Query Table Data (ttadv3181m000) session, select the table for which you want to add related tables.
  2. On the appropriate menu, select Add Related Tables. The Query Table Relationships (ttadv3581m000) session starts.
  3. Select the relevant table(s) and click OK.
Step 2. Add fields
  1. In the Query Table Data (ttadv3181m000) session, select the table record and, on the appropriate menu, select Add Table Fields. The Query Table Fields (ttadv3582m000) session starts.
  2. Select the relevant field(s) and click OK.
Step 3. Modify field properties
  1. In the Query Table Data (ttadv3181m000) session, select the table record and, on the appropriate menu, select Query Fields.... The Query Field Data (ttadv3182m000) session starts.
  2. Double-click a query field. The Query Field Data (ttadv3182s000) details session starts. In this session, modify the print sequence, specify arguments, and so on.
  3. Repeat step 2 for each field.
  4. Save the changes and close the sessions.

Depending on the Output Type of the query, you can now generate a query report or add query fields to a chart. See Defining a query (OP).

You can modify the selection criteria in the Text Manager. See Defining a query with the Text Manager (OP).