Objectives Query for top values Create a parameter query

Slides:



Advertisements
Similar presentations
Access Lesson 8 Using Advanced Queries Microsoft Office 2010 Advanced Cable / Morrison 1.
Advertisements

Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
Access Tutorial 3 Maintaining and 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.
Querying a Database Using the Select Query Window
COMPREHENSIVE Access Tutorial 2 Building a Database and Defining Table Relationships.
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
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.
Copyright 2007, Paradigm Publishing Inc. BACKNEXTEND 3-1 LINKS TO OBJECTIVES Save a Filter as a Query Save a Filter as a Query Parameter Query Inner, Left,
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access 2007 Committed to Shaping the Next Generation of.
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
CSS/417 Introduction to Database Management Systems Workshop 2.
Microsoft Access 2010 Building and Using Queries.
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.
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.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 9 1 Microsoft Office Access 2003 Tutorial 9 – Using Action Queries, and Defining Table Relationships.
® Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Access Project 3 Notes. Introduction Maintaining the Database  Modifying the data to keep it up-to-date Restructure the Database  To change the database.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
® Microsoft Access 2010 Tutorial 3 Maintaining and Querying a Database.
1 Database Systems Introduction to Microsoft Access Part 2.
COMPREHENSIVE Access Tutorial 3 Maintaining and Querying a Database.
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.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
ACCESS Part 2. OBJECTIVE  Use the Query Wizard.  Work with data in a query.  Use Query Design View.  Sort and find data.  Filter data Apply AND criteria.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
© 2001 ComputerPREP, Inc. All rights reserved. Access 2000: Module II.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 5 1 Microsoft Office Access 2003 Tutorial 5 – Enhancing a Table’s Design.
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.
Access Tutorial 2 Building a Database and Defining Table Relationships
Microsoft Office Access 2010 Lab 3
Maintaining a Database Using the Design and Update Features of Access
Microsoft Office Illustrated Introductory, Windows Vista Edition
Access Tutorial 3 Maintaining and Querying a Database
Microsoft Access – Tutorial 3
Objectives Create an action query to create a table
CIS 155 Table Relationship
Microsoft Access 2003 Illustrated Complete
Microsoft Access 2003 Illustrated Complete
Building and Using Queries
Microsoft Office Access 2003
Creating and Modifying Queries
Tutorial 3 – Querying a Database
Chapter 9 Lesson 2 Notes.
Microsoft Office Access 2003
Microsoft Office Access 2003
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Access Tutorial 2 Building a Database and Defining Table Relationships
Access Tutorial 2 Building a Database and Defining Table Relationships
Lesson 3 Chapter 10.
Microsoft Office Illustrated Introductory, Windows XP Edition
Tutorial 9 Using Action Queries and Advanced Table Relationships
Assignment 3 Querying and Maintaining a Database
Tutorial 5 Advanced Queries and Enhanced Table Design
New Perspectives on Microsoft
Presentation transcript:

Objectives Query for top values Create a parameter query Modify query properties Create an update query Creating Advanced Queries Unit K

Objectives Create a make-table query Create an append query Create a delete query Creating Advanced Queries Unit K

Introduction Queries are database objects that answer questions about the data. A select query creates a single datasheet to display the fields and records that match specific criteria An action query is one that makes changes to the data Types of action queries: delete, update, append, and make-table Creating Advanced Queries Unit K

Querying for Top Values Use the Top Values feature in Query Design View to specify a number or percentage of records that you want to display. Select a subset of the highest or lowest values in a sorted query Creating Advanced Queries Unit K

Querying for Top Values (cont.) Top Values list arrow Totals button Count LogNo Group By Description Creating Advanced Queries Unit K

Querying for Top Values (cont.) Top Value options Creating Advanced Queries Unit K

Creating a Parameter Query A parameter query displays a dialog box that prompts you for an entry. The entry is used as criteria for the query The entry narrows the number of records that appear in the datasheet Can build a form or report based on a parameter query Creating Advanced Queries Unit K

Creating a Parameter Query (cont.) Parameter prompt Parameter criteria Creating Advanced Queries Unit K

Creating a Parameter Query (cont.) Concatenating a parameter prompt to a wildcard character. You can concatenate (or combine) parameter prompts with a wildcard character such as an asterisk (*) to create more flexible queries The ampersand (&) is used to concatenate items in an expression Quotation marks (“”) are used to surround text criteria Creating Advanced Queries Unit K

Modifying Query Properties Properties are characteristics that define the appearance and behavior of database objects, fields, and controls. View the properties for an item b opening its property sheet Creating Advanced Queries Unit K

Modifying Query Properties (cont.) Click here to select the query Properties button Query properties Creating Advanced Queries Unit K

Creating an Update Query An action query changes many records in one process. In order for an action query to complete its action, you must run the query using the Run button An update query is a type of action query that updates the values in a field Creating Advanced Queries Unit K

Creating an Update Query (cont.) Update Query button Run button Update To: row Criteria Creating Advanced Queries Unit K

Creating an Update Query (cont.) Action queries Creating Advanced Queries Unit K

Creating a Make-Table Query A make-table query creates a new table of data based on the recordset defined by the query. Creates a copy of the selected data and pastes it into a new table The location of the new table can be the current or any other Access database Creating Advanced Queries Unit K

Creating a Make-Table Query (cont.) Asterisk in the field list Asterisk in the query grid Date criteria Creating Advanced Queries Unit K

Creating a Make-Table Query (cont.) 1900 versus 2000 dates. If you type only two digits of a date, Access assumes that the digits 00 through 29 are for the years 2000 through 2029 If you type 30 through 99, Access assumes the years refer to 1930 through 1999 To specify years outside these ranges, type all four digits Creating Advanced Queries Unit K

Creating an Append Query An append query adds a selected recordset by a query to an existing table called the target table Records are copied from one location and a duplicate set is pasted to another location If the target table has more fields than those you want to append, the append query will ignore the unmatched fields Creating Advanced Queries Unit K

Creating an Append Query (cont.) Append Query button Append To: row Date criteria for Attended field Creating Advanced Queries Unit K

Creating a Delete Query A delete query deletes a group of records from one or more tables as defined by a query. Delete queries delete entire records, not just selected fields within records Creating Advanced Queries Unit K

Creating a Delete Query (cont.) Delete Query button Delete: row Creating Advanced Queries Unit K

Creating a Delete Query (cont.) Reviewing referential integrity. Referential integrity between two tables is established when tables are joined It ensures that no orphaned records currently exist or are added to the database Related tables have an orphan record when information in the foreign key field of the “many” table doesn't have a matching entry in the primary key field of the “one” table Creating Advanced Queries Unit K

Creating a Delete Query (cont.) Reviewing referential integrity (cont.). An orphan record is sometimes called an unmatched record The term “orphan” corresponds to the “one” table as containing parent records, and the “many” table as containing child records A child record cannot be created without a corresponding parent record Creating Advanced Queries Unit K

Specifying Join Properties When more than one table’s field list is used in a query, the tables are joined as defined in the relationships window. If referential integrity is enforced, a “1” appears next to the field that serves as the “one” side of the one-to-many relationship Usually the primary key field for its table Creating Advanced Queries Unit K

Specifying Join Properties (cont.) If referential integrity is enforced, an infinity sign appears next to the field that serves as the “many” side of the one-to-many relationship The foreign key field for its table Edit table relationships for an individual query in Query Design View by double-clicking the join line Creating Advanced Queries Unit K

Specifying Join Properties (cont.) Double-click the join line to open the Join Properties dialog box Default join property Creating Advanced Queries Unit K

Specifying Join Properties (cont.) The Join line’s appearance shows that all records in the Courses table will be included in the datasheet Creating Advanced Queries Unit K

Specifying Join Properties (cont.) Finding duplicate and unmatched records. Use the Find Duplicates Query Wizard and Find Unmatched Query Wizard to help find duplicate and unmatched records Creating Advanced Queries Unit K