Introduction to Microsoft Office Access Queries
Introduction to Microsoft Office
Access Queries
When we create or open a database using Microsoft Office Access, the Database window
is displayed showing the objects (such as tables, forms, queries, and reports) in the
database. For example, when we open the DreamHome database, we can view the tables
in this database, as shown in Figure 7.1.
To ask a question about data in a database, we design a query that tells Microsoft Office
Access what data to retrieve. The most commonly used queries are called select queries.
With select queries, we can view, analyze, or make changes to the data. We can view data
from a single table or from multiple tables. When a select query is run, Microsoft Office
Access collects the retrieved data in a dynaset. A dynaset is a dynamic view of the data
from one or more tables, selected and sorted as specified by the query. In other words, a
dynaset is an updatable set of records defined by a table or a query that we can treat as an
object.As well as select queries, we can also create many other types of useful queries using
Microsoft Office Access. Table 7.1 presents a summary of the types of query provided by
Microsoft Office Access 2003. These queries are discussed in more detailed in the following
sections, with the exception of SQL-specific queries.
When we create a new query, Microsoft Office Access displays the New Query dialog
box shown in Figure 7.2. From the options shown in the dialog box, we can start from
scratch with a blank object and build the new query ourselves by choosing Design View
or use one of the listed Office Access Wizards to help build the query.
A Wizard is like a database expert who asks questions about the query we want and
then builds the query based on our responses. As shown in Figure 7.2, we can use Wizards
Access Queries
When we create or open a database using Microsoft Office Access, the Database window
is displayed showing the objects (such as tables, forms, queries, and reports) in the
database. For example, when we open the DreamHome database, we can view the tables
in this database, as shown in Figure 7.1.
To ask a question about data in a database, we design a query that tells Microsoft Office
Access what data to retrieve. The most commonly used queries are called select queries.
With select queries, we can view, analyze, or make changes to the data. We can view data
from a single table or from multiple tables. When a select query is run, Microsoft Office
Access collects the retrieved data in a dynaset. A dynaset is a dynamic view of the data
from one or more tables, selected and sorted as specified by the query. In other words, a
dynaset is an updatable set of records defined by a table or a query that we can treat as an
object.As well as select queries, we can also create many other types of useful queries using
Microsoft Office Access. Table 7.1 presents a summary of the types of query provided by
Microsoft Office Access 2003. These queries are discussed in more detailed in the following
sections, with the exception of SQL-specific queries.
When we create a new query, Microsoft Office Access displays the New Query dialog
box shown in Figure 7.2. From the options shown in the dialog box, we can start from
scratch with a blank object and build the new query ourselves by choosing Design View
or use one of the listed Office Access Wizards to help build the query.
A Wizard is like a database expert who asks questions about the query we want and
then builds the query based on our responses. As shown in Figure 7.2, we can use Wizards
- Select query
Asks a question or defines a set of criteria about the data in one or more tables.
- Totals (Aggregate) query
- Parameter query
Displays one or more predefined dialog boxes that prompts the user for the parameter value(s).
- Find Matched query
- Find Unmatched query
- Crosstab query
Allows large amounts of data to be summarized and presented in a compact spreadsheet.
- Autolookup query
- Action query (including delete,append, update, and make-table queries)
Makes changes to many records in just one operation. Such
changes include the ability to delete, append, or make
changes to records in a table and also to create a new table.
- SQL query (including union,pass-through, data definition, and subqueries)
Used to modify the queries described above and to set the properties of forms and reports. Must be used to create SQL-specific queries such as union, data definition, subqueries (see Chapters 5 and 6), and pass-through queries. Pass-through queries send commands to a SQL database such as Microsoft or Sybase SQL Server.
to help build simple select queries, crosstab queries, or queries that find duplicates or
unmatched records within tables. Unfortunately, Query Wizards are of limited use when
we want to build more complex select queries or other useful types of query such as
parameter queries, autolookup queries, or action queries.
Introduction to Microsoft Office Access Queries
Reviewed by Shopping Sale
on
09:21
Rating:
No comments: