Querying a Database Using the Select Query Window

Slides:



Advertisements
Similar presentations
Working with Tables 1 of 5. Working with Tables 2 of 5.
Advertisements

1 After completing this lesson, you will be able to: Create a database. Create a table using the Table Wizard. Create and modify a table in Design view.
Access Lesson 8 Using Advanced Queries Microsoft Office 2010 Advanced Cable / Morrison 1.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 2 Querying a Database Using the Select Query Window.
Access Tutorial 3 Maintaining and Querying a Database
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – Querying a Database.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Staff Development Daze June 27 & 28 Tony Gauvin. Schedule  Monday June 27  Monday June 27  9:00 – 12:00 Basic Excel  12:00 – 1:00 Lunch for all workshop.
Querying a Database Microsoft Office Access 2003.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Chapter 2 Querying a Database
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 3 Maintaining a Database Using the Design and Update Features of Access.
Chapter 2 Querying a Database
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
Chapter 3 Maintaining a Database
Maintaining and Querying a Database Microsoft Access 2010.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries.
You can use a query to view a subset of your data or to answer questions about your data. For example, if you want to view a list of student names and.
With Microsoft Office 2007 Introductory© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Introductory.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
1 Chapter 7 Query-By-Example by Monica Chan CS157B Professor Lee.
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
Querying a Database Access Project 2. 2 What is a Query?  In general, a query is a form of questioning, in a line of inquiry. A query may also refer.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T7 PROBLEM SOLVING USING ACCESS.
® Microsoft Access 2010 Tutorial 3 Maintaining and Querying a Database.
1 After completing this lesson, you will be able to: Change the format of a table. Sort records in a table. Find records in a table Use filters with a.
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics Covered Understanding different types of Queries Creating a Query Creating a Query using a Wizard Changing.
COMPREHENSIVE Access Tutorial 3 Maintaining and Querying a Database.
There are seven main components of a database in Access 2000: Tables. Use tables to store database information. Forms Use forms to enter or edit the information.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
® Microsoft Office 2013 Access Maintaining and Querying a Database.
1 After completing this lesson, you will be able to: Create and run a query. Specify criteria in a query. Create a calculated field. Create a multiple-table.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T7: Problem Solving Using Access 2007 Business Driven Technology.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
You can sort Access data so you can view records in the order you want to view them, and you can filter data so you only see the records you want to see.
T7-1 LEARNING OUTCOMES – ACCESS PROBLEM SOLVING 1.Describe the process of using the Simple Query Wizard using Access 2.Describe the process of using the.
MS-Access XP Lesson 4. Modifying Queries 1.Select query in queries 2.Click design button or Right click on query and click design view 3.Change query.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 5 1 Microsoft Office Access 2003 Tutorial 5 – Enhancing a Table’s Design.
Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 2 Querying a Database Using the Select Query Window.
Filters, Queries and Reports. Filters Limit the data, creating a dataset, or partial view of the whole database Single use – filters do not save with.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 2 ® Building Queries.
ACCESS PROJECT TWO. PROJECT ONE In project one you: -Created Tables -Created Forms -Created Reports In this project you will learn about queries. Databases.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
Maintaining a Database Using the Design and Update Features of Access
Lesson 23 Managing and Reporting Database Information
Access Tutorial 3 Maintaining and Querying a Database
Access Chapter 2 Querying a Database.
Objectives Query for top values Create a parameter query
Plug-In T7: Problem Solving Using Access 2007
Objectives Create an action query to create a table
Querying a Database Using the Select Query Window
Creating and Using a Database
Lesson 3 Chapter 10.
Creating a simple query in the Design View
Assignment 3 Querying and Maintaining a Database
Presentation transcript:

Querying a Database Using the Select Query Window Microsoft Access Querying a Database Using the Select Query Window

Objectives Creating and running queries Using compound criteria in queries Sorting data in queries Using a saved query Joining tables in queries Performing calculations in queries Using a grouping in queries

Types of Queries Queries can be used to view, and analyze information in a database In addition, update queries can be used to change data Types of queries: Select queries Parameter queries Update queries Crosstab queries Saved queries can be used to generate reports

Creating Select Queries Most common of all queries. Data can be retrieved from one or more tables; results are displayed in datasheet view Select a basis table for the query Click on the New Object button arrow, and select Query Select Design View and click OK Double click on basis table fields to insert them into the query Run the query

Select Query Datasheet View

Creating Parameter Queries Parameter queries prompt a user for search criteria with its own dialog box Start with a Select Query, and save as Client Parameter Query Add bracketed text in a criteria field to prompt the user for parameter value

Parameter Query Datasheet View

Creating Update Queries Update queries are used to make global data changes in one or more tables Start with a select query, save as Client Update Query In the Query menu, select Update Query Enter the new value in the Update To field Enter the old value to search for in the Criteria field Run the query, confirm changes

Review Changed Database All occurrences of 53 in the Trainer Number field have been updated to 42 in the Client table

Creating Crosstab Queries Crosstab queries are used to display aggregate data (such as count, total, average) in matrix format Start with a Select Query, save as Client Crosstab Query In the Query menu, select Crosstab Query Select Clear Grid in the Edit menu Double click the City, Trainer Number, and Amount Paid fields from the Client table Add a field named Total Paid: Amount Paid Refer to the picture for the Total and Crosstab settings Run the query, confirm aggregate data is correctly displayed

Crosstab Query Datasheet View

Using a Saved Query for Reports A saved query can be used for generating reports Select a saved query listed in Queries Objects Click on the New Object button arrow and select Report Select Report Wizard and click OK Pick fields you wish to see on the report Can add grouping level(s) Can sort records by up to four fields Specify layout and style, and save the report Click Finish to generate report

Using Compound Criteria in Queries Queries can contain compound search criteria AND clauses are specified by entering criteria on the same row across different fields OR clauses are specified by entering criteria on rows below other fields Can combine AND with OR clauses Can use wildcards to specify groups of items Specifies clients whose names start with an F AND has paid less than 20000, OR any Client Number that starts with a CE

Compound Criteria Datasheet View

Sorting Data in Queries Any field in a query can be sorted in ascending or descending order In Design View, look for the field to sort by (i.e. Amount Paid) Click on the Sort pull-down menu, and select Ascending or Descending Run the Query, and confirm data was sorted properly

Data Sorted by Amount Paid

Joining Tables in Queries Data needed for queries often reside on different tables. A join allows queries to retrieve relevant records from related tables Use the Trainer table as basis for a new query, and add the Client table into the query. Trainer Number joins the two tables in the query

Trainer and Client Tables Joined by Trainer Number

Performing Calculations in Queries Create a new field to display calculations based on the values of fields in a database Within Design View Type an expression in an empty cell in the Field row Field names must be bracketed (i.e. [Amount Paid]) The following calculates the Taxes Paid by multiplying the Amount Paid by the CA sales tax rate