what to know
- Install the Northwind sample database before starting.
- choose create † Query Wizard > search type > table > field to use > required details > enter title > Finish†
Database queries allow you to enter search terms to return only certain items. Here’s how to run a sample query in Access 2010 using the Query Wizard and the Northwind sample database.
Jose Luis Pelez/Getty Images
Jose Luis Pelez/Getty Images
Create a query in Access 2010
Querying a database involves retrieving some or all of the data from one or more tables or views. Microsoft Access 2010 provides a powerful Guided Query feature that makes it easy to build queries even if you don’t know how to script Structured Query Language.
Use Access 2010 and the Northwind sample database to safely explore the Query Wizard without touching your data. If you are using an earlier version of Access, you may need to perform a different procedure. Create a sample query with the names of all Northwind products, target inventory levels, and list prices for each item.
Open the database. If you have not installed the Northwind sample database, add it before continuing.If installed, go to file tab, select Open and find Northwind Database on your computer.
choose create Label.
click Query Wizard icon.
The Query Wizard makes it easy to create new queries. Another way is to use Query Design View, which allows more advanced queries but is more complex to use.
choose one question type and click OK conduct. For our purposes, we use the Simple Query Wizard.
The Simple Search Wizard opens. It contains a drop down menu which should be set to “Table: Customers” by default.In this example, choose product Table that contains information about Northwind product inventory.
Select the fields to display in the query results. By double-clicking the field or selecting the field name and then “†icon”. In this example, select the product name, list price, and target level from the Product table.
The selected fields are moved from the Available fields list to the Selected fields list. this”†icon “Select all available fields. This”<” icon allows you to remove the highlighted field from the list of selected fields, while “<This icon deletes all selected fields.
Repeat steps 5 and 6 to add other table information. In our example, we extract information from a single table. However, we are not limited to just one table. Combine information from multiple tables and display relationships. All you need to do is select the fields: Access will align the fields for you. This alignment works because the Northwind database has predefined relationships between tables. If you create a new database, you must create these relationships yourself.
click Next When you are done adding fields to the search to continue.
Select the type of results to generate. For this example, generate a complete list of products and their suppliers by: detail option and click Next button to continue.
Give your search a title. Choose something descriptive to help you identify the problem later. We call this problem “Product Supplier List†
click done before your search results. Includes Northwind product listings, required stock levels, and list prices. The tabs with these results contain your search name.
You have successfully created your first query using Microsoft Access 2010. You now have a powerful tool that you can apply to your database needs.
Creating Simple Queries in Access 2010
What to Know
Install the Northwind sample database before you begin.
Select Create > Query Wizard > a query type > a table > fields to use > desired details > enter a title > Finish.
A database query lets you enter search terms to only return certain entries. Here’s how to make a sample query using the Query Wizard and the Northwind sample database in Access 2010.
Jose Luis Pelaez Inc / Getty Images How to Create a Query in Access 2010
Querying a database involves the retrieval of some or all data from one or more tables or views. Microsoft Access 2010 offers a powerful guided query function that helps you easily build a query even if you don’t know how to write a Structured Query Language script.
Explore the Query Wizard safely, without touching your data, using Access 2010 and the Northwind sample database. If you’re using an earlier version of Access, you may need to follow a different procedure. Create a sample query listing the names of all of Northwind’s products, target inventory levels and the list price for each item.
Open the database. If you haven’t already installed the Northwind sample database, add it before proceeding. If it’s already installed, go to the File tab, select Open and locate the Northwind database on your computer.
Select the Create tab.
Click the Query Wizard icon.
The Query Wizard simplifies the creation of new queries. The alternative is to use the Query Design view, which facilitates more sophisticated queries but is more complicated to use.
Select a Query Type and click OK to continue. For our purposes, we will use the Simple Query Wizard.
The Simple Query Wizard will open. It includes a pull-down menu that should default to “Table: Customers.” In this example, select the Products table, which contains information about Northwind’s product inventory.
Choose the fields you wish to appear in the query results. Add fields by either double-clicking them or selecting the field name and then the “>” icon. In this example, select the Product Name, List Price, and Target Level from the Product table.
Selected fields move from the Available Fields listing to the Selected Fields listing. The “>>” icon will select all available fields. The “<” icon allows you to remove the highlighted field from the Selected Fields list, while the “<<” icon removes all selected fields.
Repeat steps 5 and 6 to add information from additional tables. In our example, we’re pulling information from a single table. However, we’re not limited to using only one table. Combine information from multiple tables and show relationships. All you have to do is select the fields — Access will line up the fields for you. This alignment works because the Northwind database features predefined relationships between tables. If you create a new database, you’ll need to establish these relationships yourself.
Click Next when you’re finished adding fields to your query to continue.
Choose the type of results you want to produce. For this example, generate a full listing of products and their suppliers by choosing the Detail option and clicking the Next button to continue.
Give your query a title. Select something descriptive that will help you recognize this query later. We’ll call this query “Product Supplier Listing.”
Click Finish for your query results. It contains a list of Northwind’s products, desired target inventory levels, and list prices. The tab presenting these results contains the name of your query.
You’ve successfully created your first query using Microsoft Access 2010. Now you’re armed with a powerful tool to apply to your database needs.
#Creating #Simple #Queries #Access
- Synthetic: Tài Chính Kinh Doanh
- #Creating #Simple #Queries #Access