About this task
The SQL Builder editor is a multiple-tab editor that allows you to write or graphically design as many queries as you want.
To create a new query, complete the following:
- Right-click the table or on the table column and select Generate Select Statement on the pop-up list.
Click the empty tab showing by default and type in your SQL query or press
Ctrl+Space to access the autocompletion
list. The tooltip bubble shows the whole path to the table or table section
you want to search in.
Alternatively, the graphical query Designer allows you to handle tables easily and have real-time generation of the corresponding query in the Edit tab.
Click the Designer tab to switch from the
manual Edit mode to the graphical
You may get a message while switching from one view to the other as some SQL statements cannot be interpreted graphically.
- If you selected a table, all columns are selected by default. Clear the check box facing the relevant columns to exclude them from the selection.
Add more tables in a simple right-click. On the Designer view, right-click and select Add tables in the pop-up list then select the relevant table
to be added.
If joins between these tables already exist, these joins are automatically set up graphically in the editor.You can also create a join between tables very easily. Right-click the first table columns to be linked and select Equal on the pop-up list, to join it with the relevant field of the second table.The SQL statement corresponding to your graphical handlings is also displayed on the viewer part of the editor or click the Edit tab to switch back to the manual Edit mode.Note:
In the Designer view, you cannot include graphically filter criteria. You need to add these in the Edit view.
Once your query is complete, execute it by clicking the icon on the toolbar.
The toolbar of the query editor allows you to access quickly usual commands such as: execute, open, save and clear.The results of the active query are displayed on the Results view in the lower left corner.
- If needed, you can select the context mode check box to keep the original query statement and customize it properly in the Query area of the component. For example, if a context parameter is used in the query statement, you cannot execute it by clicking the icon on the toolbar.
- Click OK. The query statement will be loaded automatically in the Query area of the component.