Database Reference
In-Depth Information
The query results shown in Figure 2-8 show an exact match; the query selects a record only when
CustomerNum equals 148.
39
Only customer
148 (Al's Appliance and
Sport) is included in
the query results
FIGURE 2-8
Query results
If you want something other than an exact match, you must enter the appropriate comparison operator,
also called a relational operator, as you will see in the next example. The comparison operators are
(equal
¼
to),
(greater than),
(less than),
(greater than or equal to),
(less than or equal to), and NOT (not
>
<
equal to).
NOTE
It is common in QBE to omit the ¼ symbol in “equal to” comparisons, although you can use it every time.
COMPOUND CRITERIA
You can use the comparison operators by themselves to create conditions. You can also combine criteria to
create compound criteria,orcompound conditions. In many query languages, you create compound criteria
by including the word AND or OR between the separate criteria. In an AND criterion, both criteria must be
true for the compound criterion to be true. In an OR criterion, the overall criterion is true if either of the
individual criteria is true.
In QBE, to create an AND criterion, place the criteria for multiple fields on the same Criteria row in
the design grid; to create an OR criterion, place the criteria for multiple fields on different Criteria rows
in the design grid.
EXAMPLE 4
List the description, on hand value, and warehouse number for all parts that have more than 10 units on
hand and that are located in warehouse 3.
Search WWH ::




Custom Search