Using the SELECT Details window
To interactively create SQL syntax for a SELECT statement, select the Create push button in the Multi-row Query Settings window.
The SELECT Details window is displayed. The tables and views of the database defined in the connection specification are listed for you in the Tables/views list.
You can limit the number of tables that appear in this list by setting high-level qualifiers. You can set high level qualifiers globally in the VA Smalltalk Preferences notebook, or for a single query in the query part's settings. See
Using high-level qualifiers for more information.
Define a SELECT statement as follows:
1. Type a name for the query in the Query name entry field.
A query requires a name that is unique within a particular access set. It cannot contain double-byte characters or spaces. For the sample application, type StaffQuery.
2. Type a description for the query in the Description entry field.
The description is optional. For the sample application, type Selects all columns in the STAFF table.
You are now ready to define a SELECT statement by working with the tables and columns of your database.
3. From the Tables/views list, select STAFF. The names of the columns that belong to the STAFF table are displayed in the Columns list.
Any time you want to see the text of the SQL statement, select the Show SQL push button. A window appears that displays the text of your SQL statement as it is being defined.
4. To retrieve all of the columns in the STAFF table, select the SELECT * check box. An asterisk is added to the Column sequence list. If you are unfamiliar with SQL syntax, * can be used in the SELECT clause to indicate that you want to select all of the columns of the tables in the FROM clause.
5. To save your query, select the Apply push button.
Your query is saved in the access set and you are returned to the Multi-row Query Settings window. The name and description of your query are displayed in the
Query name drop-down list and
Description field, respectively.
You have now defined a query that selects all of the rows from a table in a database. The next task is to return to the Multi-row Query Settings window to set fetch and update policies.
Last modified date: 05/20/2020