Procedure documentationVisual Query Locate this document in the navigation structure

 

You enter an SQL statement using the visual query editor.

Note Note

You can also enter SQL statements in text form.

More information: Entering and Executing SQL Statements

End of the note.

Procedure

  1. Select Tables in the Explorer.

  2. Choose   New   Visual SQL   in the context menu of Tables.

    The visual query editor is opened. More information: Visual Query Editor

  3. Use drag and drop to copy the desired tables from the Explorer to the visual query editor.

    The system displays secondary key relationships between tables as connecting lines (joins).

  4. Use drag and drop to copy the columns that you want to display in the result view to the Query Columns area.

  5. (Optional:) In the Query Columns area, enter search conditions and other attributes of the result view.

    Visual Query: Search Conditions and Attributes of the Result View

    Property

    Description

    Synonym

    Synonym for the column name in the result view

    Visible

    Column is displayed in the result view.

    Order

    Listing of column values in the result view

    Predicate

    Search condition

    • If you specify a search condition for a column with the data type CHAR, VARCHAR, DATE, or TIME, you must put the relational expression between single quotation marks.

    • You can enter more than one search condition using AND or OR links. If you want to use one column several times to formulate search conditions, but only want to display it once, you can hide it in the result view.

    • To enter several search conditions with AND links, enter them in the same row.

    • To formulate several search conditions with OR links, enter each of these conditions in a new row.

    More information: SQL Reference Manual,

  6. To display the SQL statement in text form, choose Export SQL in the context menu of the visual query editor.

    To execute the SQL statement, choose Execute SQL in the context menu of the visual query editor.

Creating or Deleting Joins

Note Note

You can only use normal joins in the Visual SQL Editor. Outer joins are not possible.

End of the note.

To link one table column with another table column using a join, drag the column of the first table and drop it onto the column of the second table.

The join is displayed as a connecting line between both table columns.

  • To edit the join properties, choose Join Properties in the context menu of the connecting line and enter the join properties.

  • To delete a join, choose Delete in the context menu of the connecting line.

  • If you copy the same table to the table selection twice, the system assigns an alias name. You can create SELF JOINS in this way.

More information: SQL Reference Manual,