Reference Guide
Reference Guide
Reference Guide

Visual SQL Query Builder dialog box

Used to generate database queries by graphical or visual means, and to generate reusable database form dialogs (obtained from queries) which easily interface with the database. Opens when Settings > is chosen.

Select

Opens the tab page, which is used to generate the SELECT clause of an SQL database query.

Where

Opens the tab page, which generates a WHERE clause in an SQL database query.

GroupBy

Opens the tab page, which generates a GROUP BY clause in an SQL database query.

OrderBy

Opens the tab page, which is used to sort query results.

SQL Select Statement text box

Generates an SQL query statement. A query statement is generated either by using the tab pages and their controls, or by typing directly into the text box.

Execute

Generates a form dialog corresponding to the query displayed in the SQL Select Statement text box. See .

Key-in: VSQL EXECUTE

ClearSQL

Clears all selected tables and returns all settings to default.

Key-in: VSQL CLEARSQL

Forms > Open

Opens the Open Form dialog box, a standard file selection dialog box, whose default file search filter is .rsc. It is used to open an existing form. After selecting a directory and a file, clicking OK opens the selected form dialog.

Key-in: VSQL FORMS OPEN

Forms > Edit

Opens the Edit Form dialog box. Set filename to a table name in the database to which you are currently connected. After selecting the file and clicking OK, the selected form dialog, the and the Builder open. Use the Builder dialog box and the Builder Tools palette to edit the appearance of a form dialog (see ).

Key-in: VSQL FORMS EDIT

Forms > Save As

Opens the Save Form dialog box, a standard file selection dialog box, whose default file search filter is .rsc. After selecting a directory and typing a filename for the form to be saved, clicking OK saves the open form dialog.

Key-in: VSQL FORMS SAVEAS

Forms > Exit

Closes all the Query Builder dialog boxes and form dialogs and exits the Query Builder application.

Alternatively, you can dismiss the Visual SQL Query Builder dialog box and leave other open VSQL dialog boxes intact.

Tables > Open

Opens the , which provides a list of database tables for selection for generating SQL queries.

Key-in: VSQL TABLES OPEN

Queries > Open

Opens the Open SQL Query From File dialog box, a standard file selection dialog box which is preset to select .sql files. This opens a previously saved SQL query which is loaded into the SQL Select Statement text box.

Key-in: VSQL QUERIES OPEN

Queries > Save

Saves the contents of the SQL Select Statement text box in a file.

Key-in: VSQL QUERIES SAVE

Queries > Save As

Opens a dialog box which enables you to assign a name to the SQL Select Statement to be saved.

Key-in: VSQL QUERIES SAVEAS

Queries > Save Results

Prompts for a filename where the results of the current SQL Select Statement (dataset) will be saved. Each row of the dataset is saved to a single record in the results file.

The columns are separated by the file extension of the results file:

Once you choose a format and save your results to a text file, that file can be imported into any program (i.e., word processor, spreadsheet, external database, etc.) that accepts delimited text files.

Another option for saving dataset results to a text file is using the key-in VSQL DATASET WRITE. Saving your query results in this manner allows you to read the dataset from the text file back into MicroStation. When you key in VSQL DATASET READ, your saved results are opened in a dialog box, just as they were displayed after executing the original query. If your dataset contains multiple query results, then each set of results within the dataset is displayed in its own dialog box.

Key-in: VSQL DATASET READ <FILENAME


or

Key-in: VSQL DATASET WRITE <FILENAME>


or

Key-in: VSQL DATASET READ <FILENAME>

Settings > Forms

Opens the Standard Form Items dialog box, which is used to determine the control items which appear on newly generated dialog forms.

Turn check boxes on and off to select and deselect items, and click OK to save.

Key-in: VSQL SETTINGS FORMS

Output > Forms

Displays the results of your query in a .

Output > Browser

Displays the results of your query in the .