Getting Started Guide
Figure 229: Field for distance traveled calculations
3) Calculate fuel economy:
Type ("End-Reading".Odometer – Fuel.Odometer)/"End-
Reading".FuelQuantity in the next column to the right of the word Field.
Figure 230: Fuel economy calculation field
Note
When entering fields for these calculations, you must follow this format:
table or query name followed by a period follow by the field name. For
hyphenated or multiple-word names (table or query), use double quotes
around the table or query name. The query will then add the rest of the
double quotes as in Figure 230.
Use the arithmetical symbol between the two. More than one
calculation can be done by using parentheses to group the arithmetical
operations.
Step 9: Run the query and make some modification.
After we run the query to make sure it works correctly, we will hide all of the fields
that we do not need.
1) Click the Run Query icon in the Design Query toolbar (Figure 223). The results
are in Figure 231.
Figure 231: Result of running the fuel economy query
Notice that not all of the last column label is visible because some of the labels
are long. We can fix this problem by using an alias for many of the fields. The
labels are replaced by their aliases.
2) Add Aliases:
Type in the aliases as they are listed in Figure 232.
Chapter 8 Getting Started with Base 243