The Advantage Series © 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating Select Queries Chapter 6 Microsoft Office Access 2003.

Slides:



Advertisements
Similar presentations
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
Advertisements

Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Access Lesson 2 Creating a Database
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Chapter 1 Databases and Database Objects: An Introduction
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.
FIS 318/618: Financial Systems & Databases Queries Oakland University School of Business Administration Accounting and Finance Joe Callaghan.
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Querying a Database Microsoft Office Access 2003.
With Microsoft Access 2010 © 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Access Tutorial 3 Maintaining and Querying a Database
Chapter 2 Querying a Database
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® Access 2010 © 2011 The McGraw-Hill Companies,
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
Maintaining and Querying a Database Microsoft Access 2010.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Exploring Office 2003 Vol 1 2/e - Grauer and Barber 1 Committed to Shaping the Next Generation of IT Experts. Chapter 1- Introduction to Access: What is.
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.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access Committed to Shaping the Next Generation.
With Microsoft Office 2007 Introductory© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Introductory.
Chapter 6 Advanced Report Techniques
XP Agenda Video Last Class Excel Tutorial 5: Working with Excel Lists Agenda for Next Class 1 New Perspectives on Microsoft Office Excel 2003 Tutorial.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 3 Analyzing Data and Creating Reports.
Analyzing Data For Effective Decision Making Chapter 3.
The Advantage Series ©2004 The McGraw-Hill Companies, Inc. All rights reserved Chapter 8 Managing Worksheet Lists Microsoft Office Excel 2003.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 6 – Designing.
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.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T8: Decision Making Using Access 2007 Business Driven Technology.
Microsoft ® Access ® 2010 Training Create Queries for a New Database If a yellow security bar appears at the top of the screen in PowerPoint, click Enable.
XP 1 Microsoft Access 2003 Introduction To Microsoft Access 2003.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
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.
McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 2 Modifying a Table and Creating.
DAY 19: MICROSOFT ACCESS – CHAPTER 3 CONTD. Aliya Farheen March 17, 2015.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T7 PROBLEM SOLVING USING ACCESS.
® Microsoft Access 2010 Tutorial 3 Maintaining and Querying a Database.
A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.
COMPREHENSIVE Access Tutorial 3 Maintaining and Querying a Database.
Microsoft Office XP Illustrated Introductory, Enhanced Tables and Queries Using.
® Microsoft Office 2013 Access Maintaining and Querying a Database.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T7: Problem Solving Using Access 2007 Business Driven Technology.
McGraw-Hill/Irwin The O’Leary Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Lab 3 Analyzing Tables and Creating.
Microsoft Office 2003: Advanced 1 ADVANCED MICROSOFT ACCESS Lesson 10 – Analyzing Data.
What are queries? Queries are a way of searching for and compiling data from one or more tables. Running a query is like asking a detailed question of.
Microsoft Office 2013: In Practice Chapter 3 Creating and Using Queries Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Access 2003 Lab 2 Modifying a Table and Creating.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 4: Create, Edit,
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Databases Competency Explain advanced database concepts and functions.
Excel part 5 Working with Excel Tables, PivotTables, and PivotCharts.
DAY 18: MICROSOFT ACCESS – CHAPTER 3 CONTD. Akhila Kondai October 21, 2013.
Microsoft Access 2000 Modifying Tables, Creating Forms and Viewing Data.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 5 1 Microsoft Office Access 2003 Tutorial 5 – Enhancing a Table’s Design.
Creating Advanced Queries and Enhancing Table Design.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T7: Problem Solving Using Access 2007 Business Driven Technology.
MICROSOFT ACCESS – CHAPTER 3 CONTD. Sravanthi Lakkimsetty Mar 09, 2016.
Microsoft Office Access 2010 Lab 2
Microsoft Office Access 2003
Tutorial 3 – Querying a Database
Microsoft Office Access 2003
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Presentation transcript:

The Advantage Series © 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating Select Queries Chapter 6 Microsoft Office Access 2003

© 2004 The McGraw-Hill Companies, Inc. All rights reserved 6.1 Using the Query Design View The most common query is the Select query –Gathers and arranges data according to the user’s criteria create, and customize select queries Queries can serve as the basis for forms and reports The Query design view allows you to…

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Query in Design View Figure 6.1 AC0600 Database window

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Query in Design View Figure 6.2 Query Design window Table Pane Split bar for sizing the shared space between the Table pane and query Design grid Query Design Grid The intersection of a column and row is sometimes called a cell.

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Query in Design View Figure 6.3 Adding a field to the query Design grid The mouse pointer changes to a field box when you drag it into the query Design grid.

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Query in Design View Figure 6.4 Dynaset for Student Phone List query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Modifying a Query Object Figure 6.5 Moving a column in the query Design grid

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Modifying a Query Object Figure 6.6 Dynaset for modified Student Phone List query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Search Criteria Figure 6.7 Dynaset result for “Business” students

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Search Criteria Figure 6.8 Specifying a conditional statement Field name to evaluate and display Table that the field belongs to Conditional statement for limiting the display of records

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Search Criteria Figure 6.9 Dynaset result for students over the age of 22

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Operator/ Criteria… Description… > Greater than; find numbers or dates that are greater than the specified value. For example, >5000 finds all records where the field value is more than 5,000. (Note: Don’t enter commas in numeric queries.) >= Greater than or equal to; find numbers or dates that are greater than or equal to the specified value. < Less than; find numbers or dates that are less than or equal to the specified value. For example, <#05/27/2005# retrieves all records with a date value less than May 27, (Note: Date values are surrounded by number symbols in conditional statements.) <= Less than or equal to; find numbers or dates that are less than or equal to the specified value Specifying Search Criteria Table 6.1 Query Operators

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Operator/ Criteria… Description… Between X And YList those records that contain values between X and Y inclusive. For example, use Between 21 And 65 in an Age field and use Between #01/01/2005# And #12/31/2005# in a Date field. X Or YList those records that contain either X or Y. Not XList those records not containing X. Like “Sm?th”List those records in which the first letters are “Sm”, the next letter is unknown, and the last two letters are “th”. Example: Smith, Smyth. Like “Ch*ng”List those records in which the first letters are “Ch”, the middle letters are unknown, and the last letters are “ng”. Example: Chang, Chickering. Like “*on*”List those records in which the field value contains the letter combination “on”. Example: Conditional, Monday. Like “*/*/2005”List those records that end with “2005” in the Date field Specifying Search Criteria Table 6.1 Query Operators

© 2004 The McGraw-Hill Companies, Inc. All rights reserved 6.2 Creating Multi-Table Queries Reduces redundant information Relationships among tables can be defined in the query design view Access can create relationships among tables automatically if –the tables contain a field of the same name and data type, and –one of the fields is a primary key Access allows tables to be joined so that information can be shared

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Adding and Removing Tables Figure 6.10 Relationships window for tables in the AC0600 database

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Adding and Removing Tables Figure 6.11 Modifying the query Design window

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Adding and Removing Fields Figure 6.12 Creating a multi-table query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Adding and Removing Fields Figure 6.13 Dynaset result for a multi-table query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Multi-Table Criteria Figure 6.14 Dynaset result for courses having instructor surnames beginning with “K”

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Previewing and Printing the Dynaset Figure 6.15 Print Preview window for a query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved 6.3 Enhancing a Select Query Sort the results of a query Apply filters to limit the display of records in a dynaset Apply Conditional Logic statements to create more complex search and retrieval operations –Use AND and/or OR to combine criteria statements –Specify multiple criteria in different fields, or –Specify multiple criteria in a single field With Select queries, Access can also…

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Sorting Query Results Figure 6.16 Query Design window with the Students field list

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Sorting Query Results Figure 6.17 Dynaset result sorted by the LastName field

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Sorting Query Results Figure 6.18 Specifying a multi-key sort order Primary sort key Secondary sort key

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Applying Filters to the Dynaset Figure 6.19 Dynaset result filtered for City equals Bellevue

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Applying Filters to the Dynaset Figure 6.20 Viewing filter criteria in the query Design window The field list object displays fields from another query object. The Filter By Form criterion is transferred into the Criteria row.

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Multiple Criteria in Different Fields Figure 6.21 Setting up a query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Multiple Criteria in Different Fields Figure 6.22 Dynaset result for Arts students living in Kirkland who are over 20 years old

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Multiple Criteria in Different Fields Figure 6.23 Entering criterion on separate rows of the query Design grid

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Multiple Criteria in a Single Field Figure 6.24 Dynaset result for students who live in Redmond or Bellevue

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Multiple Criteria in a Single Field Figure 6.25 Using AND and OR operators in the query Design grid

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Specifying Multiple Criteria in a Single Field Figure 6.26 Dynaset result for the Student Custom Query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved 6.4 Performing Calculations Computes a result for each record returned in a dynaset Computes a single summary result for all records returned in a dynaset Row-by-Row calculation… Aggregate calculation…

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Calculated Field Figure 6.27 Setting up a query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Calculated Field Figure 6.28 Dynaset result for student grades in COM200

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Calculated Field Figure 6.29 Dynaset result after scaling student grades upward by six percent

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating a Calculated Field Figure 6.30 Viewing a calculated field in the query Design grid

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Setting Field Properties Figure 6.31 Field Properties dialog box

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Setting Field Properties Figure 6.32 Dynaset result showing formatted values in a calculated field Formatted to display with a fixed number format and three decimal places.

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Using the Expression Builder Figure 6.33 Expression Builder dialog box The Expression box displays your selections as they are made. Select a main folder in the left-hand list box to display a new set of subcategories and element values in the next two list boxes. Select common operators by clicking these buttons. Click this button to paste a value from the right-most bottom box into the Expression box above.

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Using the Expression Builder Figure 6.34 Concatenati ng field values using the ampersand (&) symbol

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Using the Expression Builder Figure 6.35 Modifying column widths in the query Design grid

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Using the Expression Builder Figure 6.36 Dynaset result for concatenated and calculated fields

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating Summary Queries Figure 6.37 Creating a summary query When the Totals button is active, the Total row appears in the Design grid. The Total drop-down list box displays the calculation options.

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating Summary Queries Figure 6.38 Grouping calculations in a summary query

© 2004 The McGraw-Hill Companies, Inc. All rights reserved Creating Summary Queries Figure 6.39 Performing multiple calculations in a summary query