To define a query with Easy SQL

Use this procedure to define the selection criteria for a query through Easy SQL. The basic query properties for the query must have been defined. See Defining a query.

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

Fase 1. Add table(s)
  1. In the Query Data (ttadv3580m000) session, select the new query and, on the Vistas, Referencias o Acciones menu, select Query By Easy SQL.... The Query Table Data (ttadv3181m000) session starts.
  2. Click Nuevo and, from the 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 Guardar.

Nota

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 Vistas, Referencias o Acciones menu, select Add Related Tables. The Query Table Relationships (ttadv3581m000) session starts.
  3. Select the relevant table(s) and click OK.
Fase 2. Add fields
  1. In the Query Table Data (ttadv3181m000) session, select the table record and, on the Vistas, Referencias o Acciones menu, select Add Table Fields. The Query Table Fields (ttadv3582m000) session starts.
  2. Select the relevant field(s) and click OK.
Fase 3. Modify field properties
  1. In the Query Table Data (ttadv3181m000) session, select the table record and, on the Vistas, Referencias o Acciones 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.

You can modify the selection criteria in the Text Manager. See To define a query with the Text Manager.