Creating Queries  «Prev  Next»

Lesson 2 What are queries?
Objective Describe how queries can enhance the analysis of your data.

What are Access Queries?

What Can Be Done With Queries
A query is a question. Access queries enable you to ask questions of your database.
The question might be as simple as
  1. What is the description for Project 19? or more complex such as
  2. Which projects for Dynamic Solutions did I work on in August?
Queries can give you a handle on the large amounts of data that are in your database because they enable you to pick and choose, to look at certain data, and to combine data from multiple tables. They also enable you to create new, calculated fields.
When you create a query what you actually create is a query definition, that is, you define the question you want to ask your database. Each time you run the query, the query produces a datasheet containing all the data currently in your database that meets your requirements. This set of data is sometimes called a dynaset because it is a dynamic set of data.
The query definition normally includes the fields you want to see and any criteria you have. Queries can be created by using a wizard or by using the Query Design view. In this course you will learn about a certain kind of query known as the select query.
The select query, not surprisingly, is used to select data from your database. With a select query you can pull data from any of your related tables. In addition you can even add criteria so that you see only some of your data. However, there are other kinds of queries that we will not cover in detail in this course. Learn how to open a query.

Have you ever wanted to combine information from multiple tables in your database in an efficient manner? Microsoft Access offers a powerful query function with an easy-to-learn interface that makes it a snap to extract exactly the information you need from your database. In this tutorial we'll explore the creation of a simple query.

Access Queries History

Of the various components in Access, queries have probably changed the least. Therefore, many query features should be familiar to you if you are coming from client Access. You still have the same query designer that allows you to
  1. add tables,
  2. join them in certain ways,
  3. select fields to display, and
  4. apply sorting and filtering
as you have always done. You may also be pleased to find that in comparison to support for web queries in Access 2010 web databases, the feature set for queries created in Access web apps is larger.
While the feature set is still smaller than in the Access client, this module assesses the new architecture driving the creation of queries. Though the query designer looks familiar, you will learn how queries themselves are stored as SQL Server objects and how the designer is used to create and modify them. I will guide you through actions that are different from the client query designer, such as saving and previewing results from a query. The biggest change presented in queries is the new
  1. SQL syntax,
  2. expressions, and
  3. functions.
By the end of this module, you should have all the tools you need to make the transition from the SQL dialect you use in client Access databases to the SQL dialect you will use in Access web apps.