Download presentation
Presentation is loading. Please wait.
Published byTeresa Caines Modified over 10 years ago
1
Microsoft Office 2007 - Illustrated Creating Multiple Table Queries
2
Objectives Build select queriesBuild select queries Use multiple sort ordersUse multiple sort orders Develop AND criteriaDevelop AND criteria Develop OR criteriaDevelop OR criteria(continued) 2Microsoft Office 2007-Illustrated
3
Objectives (continued) Create calculated fieldsCreate calculated fields Build summary queriesBuild summary queries Build crosstab queriesBuild crosstab queries Build PivotTables and PivotChartsBuild PivotTables and PivotCharts 3Microsoft Office 2007-Illustrated
4
Building Select Queries Methods: Simple Query WizardSimple Query Wizard Query Design ViewQuery Design View 4Microsoft Office 2007-Illustrated
5
Query Design View 5Microsoft Office 2007-Illustrated One-to-many join lines Field lists Query grid identifies fields in query
6
Using Multiple Sort Orders Sort orders are evaluated in a left-to- right orderSort orders are evaluated in a left-to- right order Use the Show check box to sort on a field but not show it in the query datasheetUse the Show check box to sort on a field but not show it in the query datasheet 6Microsoft Office 2007-Illustrated
7
Specifying Sort Orders 7Microsoft Office 2007-Illustrated Primary sort order Secondary sort order
8
Developing AND Criteria AND criteria are entered on the same row of the query gridAND criteria are entered on the same row of the query grid AND criteria must both be true for the record to display in the datasheetAND criteria must both be true for the record to display in the datasheet AND criteria further limit the number of records in the datasheetAND criteria further limit the number of records in the datasheet Comparison operators or wildcard characters may be used in criteriaComparison operators or wildcard characters may be used in criteria 8Microsoft Office 2007-Illustrated
9
Developing AND Criteria 9Microsoft Office 2007-Illustrated AND criteria entered on the same row
10
Common Comparison Operators 10 Microsoft Office 2007-Illustrated
11
Developing OR Criteria OR criteria are entered on different rows of the query gridOR criteria are entered on different rows of the query grid OR criteria may either be true for the record to display in the datasheetOR criteria may either be true for the record to display in the datasheet OR criteria further expand the number of records in the datasheetOR criteria further expand the number of records in the datasheet Comparison operators or wildcard characters may be used in criteriaComparison operators or wildcard characters may be used in criteria 11Microsoft Office 2007-Illustrated
12
Developing OR Criteria 12 Microsoft Office 2007-Illustrated Enter OR criteria on different rows
13
Criteria Wildcards An asterisk (*) searches for any number of charactersAn asterisk (*) searches for any number of characters A question mark (?) searches for any single characterA question mark (?) searches for any single character A pound sign (#) searches for any single numberA pound sign (#) searches for any single number 13 Microsoft Office 2007-Illustrated
14
Using Wildcard Characters 14Microsoft Office 2007-Illustrated Using a wildcard character in query criteria. Like “7/*/2010” finds all dates in July of 2010.
15
Creating Calculated Fields Create a calculated field in the field cell of the query gridCreate a calculated field in the field cell of the query grid Calculated fields follow this patternCalculated fields follow this patternNewFieldName:expression Expressions may include field names, operators, and functions such as SumExpressions may include field names, operators, and functions such as Sum Surround field names in [square brackets]Surround field names in [square brackets] Example: LeadTime:[TourStartDate]- [SaleDate]Example: LeadTime:[TourStartDate]- [SaleDate] 15 Microsoft Office 2007-Illustrated
16
Creating Calculated Fields 16Microsoft Office 2007-Illustrated Lead Time is the new calculated field name [TourStartDate] -[SaleDate] is the expression A colon (:) separates the field name from the expression
17
Arithmetic Operators 17Microsoft Office 2007-Illustrated
18
Common Functions 18Microsoft Office 2007-Illustrated
19
Building Summary Queries A summary query calculates statistics about a group of recordsA summary query calculates statistics about a group of records Use the Total row in the query grid to specify how records are grouped and summarizedUse the Total row in the query grid to specify how records are grouped and summarized The datasheet of summary queries cannot be updated because each row represents several recordsThe datasheet of summary queries cannot be updated because each row represents several records 19 Microsoft Office 2007-Illustrated
20
Summary Query Design View 20Microsoft Office 2007-Illustrated Totals button Category is the grouping field Total row is added to query grid SalesNo values are counted Cost values summed
21
Building Crosstab Queries Crosstab queries calculate statistics about a group of records using both a row and a column headingCrosstab queries calculate statistics about a group of records using both a row and a column heading Use the Crosstab Query Wizard to create a crosstab queryUse the Crosstab Query Wizard to create a crosstab query Use the Total and Crosstab rows in the query grid to specify the crosstab settingsUse the Total and Crosstab rows in the query grid to specify the crosstab settings 21Microsoft Office 2007-Illustrated
22
Building Crosstab Queries 22Microsoft Office 2007-Illustrated Cost values summed by TourName and Category Row Headings (values from Category field) Column Headings (values from TourName field
23
Other Query Wizards 23Microsoft Office 2007-Illustrated Find Duplicates Query Wizard finds whether a table contains duplicate values in one or more fieldsFind Duplicates Query Wizard finds whether a table contains duplicate values in one or more fields Find Unmatched Query Wizard finds records in one table that do not have related records in another tableFind Unmatched Query Wizard finds records in one table that do not have related records in another table
24
Building PivotTables and PivotCharts Use the PivotTable or PivotChart View of any existing table, query, or formUse the PivotTable or PivotChart View of any existing table, query, or form Changes made to either the PivotTable or PivotChart view are automatically applied to the otherChanges made to either the PivotTable or PivotChart view are automatically applied to the other 24Microsoft Office 2007-Illustrated
25
Building PivotCharts 25Microsoft Office 2007-Illustrated Drag fields from the field list to the field locations on the PivotChart
26
Building PivotTables 26Microsoft Office 2007-Illustrated State field moved from PivotTable and filtered to display only Kansas records City field provides column values FirstContact is in the row heading area Count of Lname for each FirstContact and City
27
Comparing PivotTables, PivotCharts, and Crosstab Queries 27Microsoft Office 2007-Illustrated
28
Summary Select queries are the most common type of querySelect queries are the most common type of query Use select queries to:Use select queries to: Select a subset of fields and recordsSelect a subset of fields and records Sort dataSort data Create calculated fieldsCreate calculated fields Use Summary, Crosstab, PivotTable, and PivotCharts to show summarized informationUse Summary, Crosstab, PivotTable, and PivotCharts to show summarized information 28Microsoft Office 2007-Illustrated
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.