The Visual SQL Editor enables you to view and create database queries written in
SQL. The SQL queries are saved as a property on the rowset. To open the Visual SQL Editor, in the
, double-click a rowset object or select a rowset object,
right-click and choose Edit SQL Statement. The Visual SQL Editor contains the
diagram pane, the grid pane,
the SQL pane, and the results
pane.
You can use this editor to:
Create a query graphically. In the topmost pane, the diagram pane, add tables to a query by dragging them from the
. Lines between tables represent
joins. In the second pane from the top, the grid pane,
specify query criteria (including positional parameters) to add to the WHERE clause by selecting a column, right-clicking and
selecting Add Query Criteria to open the Add Query Criteria
dialog box. In addition, you can specify options, such as the
columns to display, the rows to select,
and how to group rows. The SQL for the query you create appears in the SQL pane.
View the existing query. In the third pane, the SQL pane, view the SQL code that will be sent to
the database.
Enter a query in the SQL pane. In the SQL pane, edit the SQL code for the
query you created in the diagram and grid panes or type in the complete query.
Test the query. In the SQL pane, right-click and and select Parse Query to make
sure the SQL query is syntactically correct.
A
representation of the results appears in the results pane.
View the data retrieved by the query. In the SQL pane or the diagram pane,
right-click and select Run Query to execute the query. The data returned appears in the
bottom pane, the results pane.