2004

Table Of Contents
754 | Chapter 26 Access External Databases
The tabbed progression of the Query Editor is particularly useful in becoming
familiar with SQL syntax. For example, you can create a query using the
Quick Query tab and then select the SQL Query tab to view how your query
is formatted using SQL.
The Query Editor provides the following tabs for building queries:
Quick Query. Provides an environment where you can develop simple
queries based on a single database field, single operator, and single value.
For example, you can find all records from the current table where the
value of the "room type" field equals "office".
Range Query. Provides an environment where you can develop a query
that returns all records that fall within a given range of values. For exam-
ple, you can find all records from the current table where the value of the
"room area" field is greater than or equal to 90 square feet and less than or
equal to 120 square feet.
Query Builder. Provides an environment where you can develop more
complicated queries based on multiple search criteria. For example, you
can find all records from the current table where the "room type" equals
"cubicle" and room area is greater than 80 square feet.
SQL Query. Provides an environment where you can develop
sophisticated queries that conform with the SQL 92 protocol. For
example, you can select * from california.headquarters.room where
california.headquarters.room.type = 'cubicle'
and
california.headquarters.room.area < 80.
See “Construct Simple Queries” on page 754 for detailed information about
constructing queries and working with operators. If you are already comfort-
able building database queries, see “Use the Query Builder” on page 758.
To open the Query Editor
1 In the dbConnect Manager, in the tree view, select a table.
2 Click the New Query button.
3 In the New Query dialog box, enter a name for the query in New Query
Name.
4 Choose Continue to open the Query Editor.
Construct Simple Queries
The simplest query uses one operator to search one field for a certain value.
The range query searches one field to return records that fall within a range
you specify.