MicroStation CONNECT Edition Help

To Use the Visual SQL Query Builder to Build a Query: Example 1

Note: A maximum of 50 tables may be open at one time.
Note: You can minimize or dismiss the large Visual SQL Query Builder dialog, leaving the smaller form dialog active. This can be useful if screen space is limited.
Note: If you are working with a table that currently contains no rows of data, turn off Execute Query on Open and Dataset Mode. This will generate an empty form ready for data entry.
  1. In the Visual SQL Query Builder dialog ( Drawing > Attach > Database > Open Visual Query Builder ), click Tables or from the Tables menu choose Open.

    The Select Table dialog opens.



  2. In the Table List option menu, choose MSCATALOG to display the tables listed in the MSCATALOG table, or choose All to display all project tables.
  3. In the Select Table dialog, double-click Parcel.

    The Parcel dialog opens in the work area on the Select table page.



    The Parcel dialog contains all columns of the Parcel table.

  4. In the Select Table dialog, click Cancel to dismiss the dialog.
  5. To move the Parcel dialog, left click the title bar, hold the left mouse button down, drag the dialog to a new location, and release the mouse button. This functionality is very useful for visually generating table joins.

    The following appears in the SQL Select Statement text box:

    SELECT
    FROM parcel
  6. Double-click the parc_no, owner, and parc_value fields.

    The SQL Select Statement updates to the following, indicating that the query is complete:

    SELECT parcel_no,owner, parc_value
    FROM parcel 

    Double-clicking again any of these selected fields will deselect them, and the query statement updates to reflect the change. Double-clicking the asterisk (*) switches between selecting and deselecting all fields.

  7. Click the Execute button to review the results based on this query.

    If Output > Forms is turned on with Dataset Mode selected, the following form is generated.



    In this example, the user can navigate forward and backward through the Parcel table using the First, Next, Previous and Last buttons. This dialog, called a form, can be saved and retrieved for future use.

    If Output > Browser is turned on, the same results are displayed in the Visual SQL Data Browser dialog.