SESSION 5.1 In this session we will be exploring Pattern Match Queries List-Of-Values Queries, Non-Matching Values in Queries Both the “And” and the “OR”

Slides:



Advertisements
Similar presentations
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Advertisements

An Introduction to Forms (continued). The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road.
Access Lesson 8 Using Advanced Queries Microsoft Office 2010 Advanced Cable / Morrison 1.
Customizing Reports. Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and.
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
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.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Querying a Database Using the Select Query Window
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.
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Tutorial 5 Creating Advanced Queries and Enhancing Table Design
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Access Presentation 3 By: Rasagnya Waghray Ali Murtuza.
Microsoft Access 2010 Chapter 7 Using SQL.
Chapter 2 Querying a Database
Advanced Tables Lesson 9. Objectives Creating a Custom Table When a table template doesn’t suit your needs, you can create a custom table in Design view.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
1 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and Custom Forms.
Your Tour Guide is Jim Provensal. What We Will Cover s Introduction to MicroSoft Access u What is a database u What is a “Relational” Database s The Major.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
On Line Viewing Tip #1: While viewing this presentation in your browser, select Browse, Full Screen. Then, when you want to pause the show, Right Click.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Lesson 31: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Design.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries.
With Microsoft Office 2007 Introductory© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Introductory.
Exam Review – Queries & MORE! Access SimNet Exam Access Case Exam Final Exam.
Queries. What is a query? A query is actually the name for any database manipulation operation. The most commonly used type is a select query, which is.
Creating your own form from scratch.. To create a custom form, you can modify an existing form or design and create a form from scratch. In either case,
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.
Analyzing Data For Effective Decision Making Chapter 3.
© 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.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
McGraw-Hill/Irwin ©2009 The McGraw-Hill Companies, All Rights Reserved Business Driven Information Systems 2e Plug-In T6: Basic Skills and Tools Using.
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.
Microsoft Office 2007 Access Chapter 2 Querying a Database.
Examining data using Microsoft Access Queries Using Criteria and Calculations SESSION 3.2 This section covers specifying an exact match condition in a.
SESSION 3.1 This section covers using the query window in design view to create a query and sorting & filtering data while in a datasheet view. Microsoft.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
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.
® Microsoft Access 2010 Tutorial 5 Creating Advanced Queries and Enhancing Table Design.
An Introduction to Forms. The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are.
Customizing Reports Adding a Date to a Report Reference Window Adding a Date to a Report Display the report in the design view Click the Text Box Tool.
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.
Creating a multi-page form using Tab Controls. In today’s class, we will be using the Tab Control method to create the Form / SubForm combination.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Creating Advanced Queries and Enhancing Table Design.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
1 11 Chapter 7 Action Queries Exploring Microsoft Office Access 2007.
Microsoft Office Access 2010 Lab 3
Access Chapter 2 Querying a Database.
Querying a Database Using the Select Query Window
Microsoft Access 2003 Illustrated Complete
Microsoft Office Access 2003
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Lesson 3 Chapter 10.
Tutorial 5 Advanced Queries and Enhanced Table Design
New Perspectives on Microsoft
Presentation transcript:

SESSION 5.1 In this session we will be exploring Pattern Match Queries List-Of-Values Queries, Non-Matching Values in Queries Both the “And” and the “OR” Operators Parameter Queries (or “Prompt Queries”) CrossTab Queries TopValue Queries Microsoft Access 2000 Class #5

The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are here!

Remember, a query is a question you ask about data stored in a database.

Pattern Match Queries, List-Of-Values Queries, Non-Matching Values in Queries, Both the “And” and the “OR” Operators and Parameter Queries (or “Prompt Queries”) are all simply normal select queries that use criteria. The Criteria Row

Last session we looked at defining record selection by using criteria and creating calculated fields in Select queries. The Criteria Row

In this session we will look at specific criteria in Select queries. The Criteria Row

Let’s take a quick look at the “Like”, “In”, “Not”, & the “And / Or” comparison operators that we will be using in our class exercise for this session. The “Like” comparison operator (used in pattern matches) selects records by matching field values to a specific pattern that includes one or more wildcard characters - asterisk (*), question mark (?), and the number symbol (#).

To show only those records with an area code of 313 you would enter this in the Phone Criteria Row

In the previous example we used parentheses ( ) in our criteria expression.. If we had not needed the parentheses we could have simply typed 313* and Access would have inserted the word Like and the quotes for us.

The asterisk represents any string of characters, the question mark represents any single character, and the number symbol represents any single digit. Using a pattern match is similar to using an exact match, except that a pattern match includes wildcard characters.

A list-of-values match selects records whose value for the selected field matches one of two or more simple condition values. You could accomplish this by including several “Or” conditions in the design grid, but Access also provides the “In” comparison operator that works as a shorthand.

The “In” comparison operator allows you to define a condition with two or more values. If a record’s field value matches at least one value from the list of values, Access selects that record for inclusion in the query results.

To show all records that contain CustomerNum 123, 135 and 202 you would enter this in the CustomerNum Criteria row

A non-matching value selects records whose value for the selected field does not match the simple condition value. You create the selection criterion using the “Not” logical operator.

To omit all states that begin with the letter M you would enter this in the State Criteria row

You could also type just Not M* and Access would insert the Like and Quotes for you.

Let’s talk about something called compound conditions for a moment. Barbara just came in and asked to see a list of all customers in Ohio and Michigan. Notice the word “and” in Barbara’s request.

What would happen if we typed “OH” And “MI” in the State Field’s Criteria Row?

The result would look something like this, not finding anything. That’s because we have asked Access to show us all records that contain both MI and OH in the same field.

To answer Barbara’s question we would have to enter

This criteria would return something like

You have the option of entering this criteria in two ways

Using the second method as shown below Would return only records in Ohio that contain “756” in the Phone field and every record in Michigan.

Using the second method as shown below Would return only records in Ohio that contain “756” in the Phone field and only records in Michigan that contain “756” in the Phone field.

Hmm?? Lately it seems as though the questions are getting more and more intense!

What if ? Barbara especially is beginning to realize that many unsolved mysteries can be solved with this program by using queries.

This has been causing Barbara’s Staff a considerable amount of concern. Two things have been happening. First, more and more time has been spent creating queries.

Secondly, The number of queries is growing and it’s becoming more and more difficult to keep track of which query is which. There is an answer to this dilemma!

The wizards at Microsoft have come up with a very simple solution!

The solution is a parameter query!

A parameter query is a query that prompts you for criteria when the query is viewed or run. When Access runs the query, it will display a dialog box and prompt you to enter the criteria desired.

To create a parameter query, simply enter the text that you want as your prompt in square brackets in the criteria row for the field that you want to set the criteria for.

Can I get summaries ? Leonard is interested. in how much business. Valle Coffee is. doing in each. state! He wants. to know the. total sales by. state and by. month.

Is the Sun in the Sky? “YES!”. The answer is “YES!”. “CrossTab Queries”! The solution is “CrossTab Queries”!

and displays the results in a spreadsheet like format. A Crosstab query performs aggregate (total) function calculations on the values of one database field,

through the steps for creating crosstab queries. The quickest way to create a crosstab query is to use the Crosstab Query Wizard, which guides you

A Crosstab query can also display one additional aggregate function value that summarizes each row’s set of values.

The crosstab query datasheet below shows the total sales for each month by state and shows a row total.

There are 3 other types of select queries that we need to take a quick look at.  Find Duplicates  Find Unmatched  Top Values

Finding duplicate records in very large databases can be a very distasteful and tedious task

A find duplicates query is a select query that locates duplicate records in a table or query.

You can create this type of query using the Find Duplicates Wizard!

Finding unmatched records in very large databases can also be a very tedious task

A find unmatched query is a select query that locates unmatched records in a related table.

For example, if you can not establish referential integrity between the Customer Table and Order Table, you might have a customer # in the order table that does not exist in the customer table.

You can create this type of query using the Find Unmatched Query Wizard!

The last select query that we will explore is called a Top Values Query

Whenever you have a query that displays a large group of records, you can limit the number to a more manageable size by showing just the first 10 records for example.

The Top Values property for a query lets you limit the number of records in the query results. For the Top Values property, you enter either an integer (such as 10, to show the first 10 records) or a percent (such as 50%, to show the first half.)

The Top Values Query Button can be found on the Query Design Window’s Tool Bar as shown below:

Page AC 5.23 Quick Check Review

Let’s take a few moments to break up into discussion groups. Each group will discuss the quick check questions on page AC 5.23 in your books. We will then review the answers at the end of the discussion.

Quick Check Review Session 5.1 1) What is a Lookup Wizard field?

Quick Check Review Session 5.1 2) What is a subdatasheet?

Quick Check Review Session 5.1 3) A(n) ___________ is a predefined format you use to enter data in a field.

Quick Check Review Session 5.1 4) Which comparison operator is used to select records based on a specific pattern?

Quick Check Review Session 5.1 5) What is the purpose of the asterisk (*) in a pattern match query?

Quick Check Review Session 5.1 6) When do you use the In Comparison operator?

Quick Check Review Session 5.1 7) How Do you negate a selection criterion?

Quick Check Review Session 5.1 8) When do you use a parameter query?

Here we go again !

The staff at Valle Coffee have just finished their weekly meeting and as you can expect, there are more questions than ever to be answered!

Your task today is to complete the exercises in Tutorial #5 Page AC 5.14 through Page AC 5.23

Please make a note that the disks to use for today’s class are: Tutorial #5 Level 2 Disk1